title: Import TypeScript from JavaScript using webpack
body: <p><strong>Edit</strong>: I simply forgot to add typescript and ts-loader dependencies to my project..</p>
  
  <p>I'm trying to import a file called Test.ts from my main.js.</p>
  
  <p>Test.js:</p>
  
  <pre class="lang-js prettyprint-override"><code>export default class Test {}
  </code></pre>
  
  <p>main.js:</p>
  
  <pre class="lang-js prettyprint-override"><code>import Test from './Test' // or `const Test = require('./Test')`
  </code></pre>
  
  <p>In my webpack.config.js I have the following:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
    resolve: {
      extensions: ['.js', '.ts']
    },
    module: {
      rules: [
        {
          test: /\.(js|ts)$/,
          loader: 'babel-loader'
        },
        {
          test: /\.ts$/,
          loader: 'ts-loader'
        }
      ]
    }
  }
  </code></pre>
  
  <p>On compilation I get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>This relative module was not found:
  
  * ./Test in ./src/main.js
  </code></pre>
  
  <p>What am I missing?</p>