title: VueJs: Failed To Mount Component
body: <p>I'm using Vue Router and instead of loading the component it throws me this vague error:</p>
  
  <pre><code>Failed to mount component: template or render function not defined.
  
  found in
  ---&gt; &lt;Anonymous&gt;
         &lt;Root&gt;
  </code></pre>
  
  <p><strong>Here is my entry point (app.js)</strong> (note I'm using multiple entries in combination with the CommonsChunksPlugin): </p>
  
  <pre><code>import Vue from 'vue'
  
  import '../../../assets/css/main.css'
  
  import App from './app.vue'
  
  new Vue(App).$mount('#app')
  </code></pre>
  
  <p><strong>The Html File (app.html)</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, 
  maximum-scale=1.0, user-scalable=0"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="app"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>(app.vue)</strong></p>
  
  <pre><code>&lt;template&gt;
  &lt;div&gt;
      &lt;router-view&gt;&lt;/router-view&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
      import {
              router,
      } from './bootstrap.js';
      export default {
          router,
      };
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>The Router:</strong></p>
  
  <pre><code>import Vue from 'vue';
  
  import VueRouter from 'vue-router';
  
  var routes = [
                  {
                      path: '/login',
                      name: 'login.index',
                      component: require('./index/index.vue'),
                  },
                  {
                      path: '/',
                      redirect: '/login',
                  },
          ];
  
  Vue.use(VueRouter);
  
  export const router = new VueRouter({
       routes,
  });
  
  
  Vue.router = router;
  
  export default {
      router,
  };
  </code></pre>
  
  <p><strong>And Finally the Component:</strong> </p>
  
  <pre><code>&lt;template&gt;
  &lt;div&gt;
      &lt;h1&gt;Test&lt;/h1&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      export default {}
  &lt;/script&gt;
  </code></pre>
  
  <p>I get redirected to /login as expected but the component won't load. </p>