var path = require('path'),
    HtmlWebpackPlugin = require('html-webpack-plugin'),
    CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin'),
    jade = require('jade');

var baseDir = path.resolve(__dirname),
    nodeModulesDir = path.resolve(baseDir, 'node_modules'),

    pathToMain = path.resolve(baseDir, 'dev/main.jsx'),
    indexHtml = jade.compileFile(path.resolve(baseDir, 'dev/index.jade')),

    babel = 'babel?optional=es7.objectRestSpread&optional=runtime',
    // jsLoader = ['react-hot', 'babel?whitelist[]=flow', 'flowcheck', babel + '&blacklist[]=flow']; // hack from flowcheck/issues#18
    jsLoader = ['react-hot', babel]; // until https://github.com/facebook/flow/issues/349 is fixed

var config = {
  entry: {
    app: ['webpack/hot/dev-server', pathToMain],
    vendor: ['react']
  },
  resolve: {
    alias: {}
  },
  devtool: 'eval',
  debug: true,
  output: {
    path: path.resolve(baseDir, 'build'),
    filename: 'bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: 'Circuit-Diagram',
      templateContent: function(templateParams) {
        var files = templateParams.htmlWebpackPlugin.files; // js, css, chunks
        return indexHtml(files);
      }
    }),
    new CommonsChunkPlugin('vendor', 'common.js')
  ],
  module: {
    loaders: [
      {
        test: /\.css$/,
        loaders: ['style', 'css']
      },
      {
        test: /\.scss$/,
        loaders: ['style', 'css', 'sass']
      },
      {
        test: /\.(js|jsx)$/,
        exclude: [nodeModulesDir],
        loaders: jsLoader
      },
      { // will be run before loaders above
        test: /\.(js|jsx)$/,
        exclude: [nodeModulesDir],
        loader: 'eslint-loader'
      },
      {
        test: /\.json$/,
        loader: 'json'
      },
      {
        // Expose React - react-router requires this
        test: require.resolve('react'),
        loader: 'expose?React'
      }
    ],
    eslint: {
      'emitWarning': true,
      'emitError': true,
      'quiet': false
    }
  }
};

module.exports = config;

@@ -481,17 +481,17 @@
 runtime'
-,
+;
 %0A    // 
@@ -621,133 +621,112 @@
 #18%0A
-    jsLoader = %5B'r
+%0Avar config = %7B%0A  entry: %7B%0A    /* NOTE: R
 eact
--hot', babel%5D; // until https://github.com/facebook/flow/issues/349 is fixed%0A%0Avar config = %7B%0A  entry: %7B
+ hot loader doesn't work with higher-order components :( */
 %0A   
@@ -791,16 +791,46 @@
 %5B'react'
+, 'react-art', 'art', 'reflux'
 %5D%0A  %7D,%0A 
@@ -1560,24 +1560,98 @@
 oaders: 
-jsLoader
+%5B'react-hot', babel%5D // until https://github.com/facebook/flow/issues/349 is fixed
 %0A      %7D

Add extras to 'vendor' in webpack config