title: Vue.js ES6 import export
body: <p>Well I'm facing a problem with importing multiple modules in ES6, using babel. I'm trying structure my app in Vue.js as a modular components (or in precise the structure that follows in Angular2 for features)</p>
  
  <pre><code>app/
    moduleA/
      components/
      vuex/
      index.js
      routes.js
    moduleB/
      components/
      vuex/
      index.js
      routes.js
    index.js
    routers.js
    vuex.js
    components.js
  router/
  vuex/
  components/ -&gt; shared
  main.js
  </code></pre>
  
  <p>Now, my question is, how can I export and import all modules to work perfectly?</p>
  
  <p>So let's say for the moduleA routes I've the following code</p>
  
  <pre><code>//moduleA/routes.js
  export const routes = [
  { path: '', name: 'home', components: {
      default: Home,
      'header-top': Header
  } }
  ];
  </code></pre>
  
  <p>And again for moduleB routes </p>
  
  <pre><code>//moduleA/routes.js
  export const routes = [
  { path: '/user', components: {
      default: User,
      'header-bottom': Header
  }, children: [
      { path: '', component: UserStart },
      { path: ':id', component: UserDetail },
      { path: ':id/edit', component: UserEdit, name: 'userEdit' }
  ] }
  ];
  </code></pre>
  
  <p>Then, how can I import and get this work. Please help.</p>
  
  <p>Thanks</p>