title: Webpack Can't resolve other modules while building in my boilerplate project
body: <p>I've created boilder plate project with webpack, react, typescript etc. but whenever I build my project, webpack throw this errors on my entry point that Cannot resolve other modules (which is just simple Login component)
  This is my webpack's error message</p>
  
  <pre><code>ERROR in ./src/index.tsx
  Module not found: Error: Can't resolve './components/Login' in '/Users/myname/Desktop/Projects/front/src'
   @ ./src/index.tsx 6:14-43
  
  </code></pre>
  
  <p>This is my index.tsx file</p>
  
  <pre><code>import * as React from 'react';
  import * as ReactDOM from 'react-dom';
  import { BrowserRouter } from 'react-router-dom';
  import Login from './components/Login';
  
  
  ReactDOM.render(
    &lt;BrowserRouter&gt;
      &lt;Login /&gt;
    &lt;/BrowserRouter&gt;,
    document.getElementById('root')
  );
  </code></pre>
  
  <p>And this is my Login components, which webpack cannot resolve</p>
  
  <pre><code>import * as React from 'react';
  
  export default () =&gt; &lt;div&gt;Login&lt;/div&gt;;
  </code></pre>
  
  <p>This is my webpack config and package.json's scripts</p>
  
  <p>webpack.config.js</p>
  
  <pre><code>const HtmlWebpackPlugin = require('html-webpack-plugin');
  const path = require('path');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  
  module.exports = {
    entry: './src/index.tsx',
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          loader: 'awesome-typescript-loader',
          options: {
            useCache: true,
            reportFiles: ['src/**/*.{ts,tsx}']
          }
        },
        {
          enforce: 'pre',
          test: /\.js$/,
          loader: 'source-map-loader'
        }
      ]
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: 'template/index.html'
      })
    ],
    mode: 'production',
    output: {
      path: path.resolve(__dirname, 'build/'),
      filename: 'bundle.[hash].js'
    },
    plugins: [new CleanWebpackPlugin()]
  };
  </code></pre>
  
  <p>package.json's scripts</p>
  
  <pre><code>"scripts": {
      "build": "webpack"
    },
  </code></pre>
  
  <p>I tried minimize my project as possible so you can focus on this single problem, why the hack my webpack cannot resolve ordinary component file? you can find this minimized project on <a href="https://github.com/sh2045/myproblem" rel="nofollow noreferrer">https://github.com/sh2045/myproblem</a>
  you can just clone it, and run </p>
  
  <pre><code>npm i 
  npm run build
  </code></pre>
  
  <p>and you can see error message, please help :(</p>