title: webpack babel 'require is not defined'
body: <p>I am having a strange browser warning when running webpack-dev-server, but no warning from webpack or webpack-dev-server.
  I have looked for a solution but all similar past issues appear from mid 2015.</p>
  
  <p>This level of tracking is beyond me at the moment.</p>
  
  <p>Error as follows:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: require is not defined
        at Object. (<a href="http://localhost:8080/public/js/main.js:38204:2" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:38204:2</a>)
        at <strong>webpack_require</strong> >(<a href="http://localhost:8080/public/js/main.js:20:30" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:20:30</a>)
        at Object. (<a href="http://localhost:8080/public/js/main.js:38039:12" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:38039:12</a>)
        at <strong>webpack_require</strong> >(<a href="http://localhost:8080/public/js/main.js:20:30" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:20:30</a>)
        at Object. (<a href="http://localhost:8080/public/js/main.js:20467:25" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:20467:25</a>)
        at <strong>webpack_require</strong> >(<a href="http://localhost:8080/public/js/main.js:20:30" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:20:30</a>)
        at Object. (<a href="http://localhost:8080/public/js/main.js:55:13" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:55:13</a>)
        at <strong>webpack_require</strong> >(<a href="http://localhost:8080/public/js/main.js:20:30" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:20:30</a>)
        at <a href="http://localhost:8080/public/js/main.js:40:18" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:40:18</a>
        at <a href="http://localhost:8080/public/js/main.js:43:10" rel="nofollow noreferrer">http://localhost:8080/public/js/main.js:43:10</a></p>
  </blockquote>
  
  <p>38204:</p>
  
  <pre><code>require('./browser_loader');
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>module.exports = {
    entry: './src/index.js',
    output: {
      path: __dirname + '/public/js',
      filename: 'main.js'
    },
    resolve: {
      extensions: ['', '.js', '.jsx']
    },
    module: {
      noParse: [/aws-sdk/],
      loaders: [{
        test: /\.jsx?$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        query: {
          presets: ['react', 'es2015']
        }
      }, 
      {
        test: /\.sass$/,
        loader: 'style!css!sass?indentedSyntax=true&amp;sourceMap=true'
      }]
    },
  }
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>import React from 'react';
  import { render } from 'react-dom';
  import App from './components/app';
  //import '../css/main.css';
  import '../css/main.sass';
  
  render (&lt;App /&gt;, document.getElementById('app'));
  </code></pre>