title: WebPack - Error can't find .src folder
body: <p>I'm trying to understand how webpack works, so I create a simple application with <code>node js</code> and <code>react</code>.</p>
  
  <p>When I run webpack build script I get this error:</p>
  
  <p><code>ERROR in Entry module not found: Error: Can't resolve './src'</code></p>
  
  <p>I have this folder structure:</p>
  
  <pre><code>root
      src
      package.json
      webpack.config
  </code></pre>
  
  <p><code>src</code> contains all application files</p>
  
  <p>and this is my <code>webpack.config</code> file:</p>
  
  <pre><code>const debug = process.env.NODE_ENV !== "production";
  
  const webpack = require('webpack');
  const path = require('path');
  
  module.exports = {
      context: __dirname,
      devtool: debug ? 'inline-sourcemap' : null,
      entry: path.join(__dirname, 'src', 'app-client.js'),
      output: {
          path: path.join(__dirname, 'src', 'public', 'javascripts'),
          publicPath: "/javascripts/",
          filename: 'bundle.js'
      },
      module: {
          loaders: [{
              test: path.join(__dirname, 'src'),
              loader: ['babel-loader'],
              query: {
                  cacheDirectory: 'babel_cache',
                  presets: debug ? ['react', 'es2015', 'react-hmre'] : ['react', 'es2015']
              }
          }]
      },
      plugins: debug ? [] : [
          new webpack.DefinePlugin({
              'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
          }),
          new webpack.optimize.DedupePlugin(),
          new webpack.optimize.OccurenceOrderPlugin(),
          new webpack.optimize.UglifyJsPlugin({
              compress: { warnings: false },
              mangle: true,
              sourcemap: false,
              beautify: false,
              dead_code: true
          }),
      ]
  };
  </code></pre>
  
  <p>and this is my build script:</p>
  
  <pre><code>cross-env NODE_ENV=production node_modules/.bin/webpack -p
  </code></pre>