title: VueJS Single File Component with typescript: Unable to find module stuff.vue
body: <p>I have a simple project structure:</p>
  
  <p>/src/app2/main.ts
  /src/app2/components/lib.ts
  /src/app2/components/stuff.vue</p>
  
  <p>With webpack, vue-loader, and ts-loader.</p>
  
  <p>main.ts has:</p>
  
  <pre><code>import Vue = require('vue');
  import  Component from './components/lib'
  
  new Vue({
    el: '#app2'
  
  });
  </code></pre>
  
  <p>When trying to build this with 1 webpack entry for <code>/src/app2/main.ts</code>, the error generated is:</p>
  
  <pre><code>ERROR in C:\temp\vuetest2\proj\src\app2\components\lib.ts
  (2,25): error TS2307: Cannot find module './stuff.vue'.
  
  ERROR in ./src/app2/main.ts
  Module not found: Error: Can't resolve './components/lib' in 'C:\temp\vuetest2\proj\src\app2'
   @ ./src/app2/main.ts 3:12-39
  </code></pre>
  
  <p>If I change the entry point to <code>src/app2/components/lib.ts</code>, it will build.  I'm at a loss as to why main.ts won't build.</p>
  
  <p>Contents of lib.ts:</p>
  
  <pre><code>import Vue = require('vue');
  import Stuff  = require('./stuff.vue');
  
  
  let o = {
     Stuff
  }
  
  let componentLibrary = {
    components: o,
    registerExternal: function(v:any) {
      for(var k in o) {
          v.component(o[k].name, o[k]);
      }
    },
    registerInternal: function() {
      for(var k in o) {
          Vue.component(o[k].name, o[k]);
      }
    }
  }
  
  export default componentLibrary;
  </code></pre>
  
  <p>Stuff.vue is just a simple single file vue component.</p>