title: Can't resolve module in react
body: <p>According to the following: Webpack 2: <a href="https://stackoverflow.com/a/39933782/418343">cannot resolve module</a></p>
  
  <p>I have tried to use <code>modules</code> instead of <code>alias</code> to load my component like this :</p>
  
  <pre><code>  resolve: {
      modules: [__dirname, 'node_modules',path.resolve('./app/components')],
      alias:{
        applicationStyles:'app/styles/app.scss'
      },
  </code></pre>
  
  <p>but i get the following webpack error:</p>
  
  <blockquote>
    <p>ERROR in ./app/app.jsx Module not found: Error: Can't resolve
    'TodoApp' in 'C:....'  @ ./app/app.jsx 10:14-32  @ multi
    babel-polyfill script-loader!jquery/dist/jquery.min.js
    script-loader!foundation-sites/dist/js/foundation.min.js ./app/app.jsx</p>
  </blockquote>
  
  <hr>
  
  <p>Every thing goes okay, If i use <code>alias</code> for each component instead like this:</p>
  
  <pre><code> resolve: {
      modules: [__dirname, 'node_modules'],
      alias:{
        applicationStyles:'app/styles/app.scss',
        TodoApp: 'app/components/TodoApp.jsx'
      },
      extensions: ['*','.js','.jsx;']
    },
  </code></pre>