title: Webpack dev-server Unexpected identifier error
body: <p>I am new to React+Webpack. As a part of the tutorial, I have written a <code>webpack.config.js</code> file. This is the file content:</p>
  
  <pre><code>var webpack = require('webpack');
  var path = require('path');
  
  module.exports = {
      devtool: 'inline-source-map',
      entry: [
          'webpack-dev-server/client?http://localhost:8080/',
          'webpack/hot/only-dev-server',
          './src'
      ],
      output: {
          path: path.join(__dirname, 'public'),
          filename: 'bundle.js'
      },
      resolve:{
          moduleDirectories: ['node_modules', 'src'],
          extensions: ['', '.js']
      }
      module:{
          loaders:[
              {
                  test: /\.jsx?$/,
                  exclude: /node_modules/,
                  loaders: ['react-hot','babel?presets[]=react,presets[]=es2015']
              }
          ]
      },
      plugins:[
          new webpack.HotModuleReplacementPlugin(),
          new webpack.NoErrorsPlugin()
      ]
  };
  </code></pre>
  
  <p>I am getting Unexpected Identifier error at line number 19-> <code>module:{...},</code></p>
  
  <p>Error details:</p>
  
  <pre><code>/home/adi/testcode/webpack.config.js:19
      module:{
      ^^^^^^
  SyntaxError: Unexpected identifier
      at Object.exports.runInThisContext (vm.js:78:16)
      at Module._compile (module.js:543:28)
      at Object.Module._extensions..js (module.js:580:10)
      at Module.load (module.js:488:32)
      at tryModuleLoad (module.js:447:12)
      at Function.Module._load (module.js:439:3)
      at Module.require (module.js:498:17)
      at require (internal/module.js:20:19)
      at module.exports (/usr/lib/node_modules/webpack/bin/convert-argv.js:80:13)
      at Object.&lt;anonymous&gt; (/usr/lib/node_modules/webpack/bin/webpack.js:39:40)
  </code></pre>
  
  <p>I have checked <code>webpack.config.js</code> examples, and found what I wrote is correct. Yet it is not working as expected.  Unfortunately, I couldn't find solution in GitHub issues, StackOverflow, and Quora. </p>
  
  <p>Where am I making a mistake?</p>