I created a Vue.js project that uses the .vue component specs format when writing components for my project (see example below). What i noticed, is that plain JavaScript can export these components loaded from vue files. For example, index.js can export an component defined in index.vue. What I'm trying to do now is export multiple components from the index.js. However, when i import the multiple components, they do not render. If i import the index.js as a single object, and then extract the components, it works correctly. Why/How can't i extract multiple components from index?
index.js
import A from './A.vue';
import B from './A.vue';
export default { A, B };
home.vue
<script>
import Main from "../common/forms";
const { A, B } = Main; // Works
// import { A, B } from "../common/forms"; // Not Working
export default {
name: 'app-home',
components:{ A, B}
}
</script>
<template>
<div id="app-home">
<h1>App Home </h1>
<A />
<B/>
</div>
</template>