title: Require not working in vue.js
body: <p>I'm new to vue trying to build a simple SPA with <code>Vue</code> without <code>vue-router</code>. Following the <code>vue-2.0-simple-routing-example</code> I'm just trying to serve pages via <code>require(dynamicPathToFile+'.vue')</code>. But it's not working. </p>
  
  <p>This works:</p>
  
  <p><strong>Main.Vue</strong></p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          &lt;p&gt;Hello World&lt;/p&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><strong>Main.JS</strong></p>
  
  <pre><code>import Vue from 'vue'
  import App from './main.vue'
  
  const app = new Vue({
    el: '#app',
    render (h) {
      return h(App)
    }
  })
  </code></pre>
  
  <p>but why doesn't this work? </p>
  
  <p><strong>Main.JS</strong></p>
  
  <pre><code>import Vue from 'vue'
  
  const app = new Vue({
    el: '#app',
    render (h) {
      return h(require('./main.vue'))
    }
  })
  </code></pre>
  
  <p>It compiles just fine, but in my javascript console I get</p>
  
  <pre><code>[Vue warn]: Failed to mount component: template or render function not defined.
  
  found in
  
  ---&gt; &lt;Anonymous&gt;
         &lt;Root&gt;
  </code></pre>
  
  <p>Nothing displays</p>
  
  <p>how do i get it to work so I can dynamically require a page, rather than import it at the top?</p>