title: Webpack - [HMR] Hot Module Replacement is disabled
body: <p>I've looked around, but can't get any of the answers I've seen on stackoverflow to work.</p>
  
  <p>I cannot use the command line for webpack or the webpack dev-server; I am restricted to using the Node API.</p>
  
  <p>Below is how I am using webpack.</p>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>module.exports = {
    entry: [
      'webpack-dev-server/client?http://localhost:3000',
      // i've also tried webpack/hot/dev-server here
      'webpack/hot/only-dev-server',
      path.join(__dirname, 'src', 'js', 'app.jsx')
    ],
    output: {
      path: path.join(__dirname, 'dist', 'js'),
      filename: 'script.js',
      publicPath: '/dist/'
    },
    module: {
      loaders: [{
        test: /\.(js|jsx)$/,
        loaders: ['react-hot', 'babel']
      }]
    },
    plugins: []
  };
  </code></pre>
  
  <p><strong>contained in a gulp task "start"</strong></p>
  
  <pre><code>gulp.task('start', function (callback) {
    var config = Object.create(require('webpack.config.js'));
    config.plugins.push(new webpack.HotModuleReplacementPlugin());
  
    var devServer = new webpackDevServer(webpack(config), {
      stats: { colors: true },
      contentBase: path.resolve(__dirname, 'dist'),
      progress: true,
      inline: true,
      hot: true
    });
  });
  </code></pre>
  
  <p><strong>What I expect</strong></p>
  
  <p>When I run gulp start, I expect the webpack dev server to spin up, allowing me to hit localhost:3000/. This should load an index.html from my project's /dist/ folder. So far so good. I expect that when I make a change to a file (e.g., app.jsx), that the change would be present.</p>
  
  <p><strong>What is actually happening</strong></p>
  
  <p>I am getting the error "[HMR] Hot Module Replacement is disabled", with no further explanation.</p>
  
  <p>Any help would be appreciated. I have been trying to get hot reloading working for a full day.</p>