var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var env = process.env.NODE_ENV || 'production';
var entry = process.env.ENTRY || 'Example';


var eslintLoader = {
  test: /\.js$/,
  loaders: ['eslint'],
  include: [new RegExp(path.join(__dirname, 'src'))]
};


module.exports = {
  devtool: 'eval',

  entry: [
    './src/example/' + entry + '.js'
  ].concat(env === 'production' ? [] : [
      'webpack-dev-server/client?http://localhost:8080',
      'webpack/hot/only-dev-server'
    ]),

  output: {
    filename: 'index.js',
    path: path.resolve('./example')
  },

  plugins: [
    new HtmlWebpackPlugin(),
    new ExtractTextPlugin('style.css', {allChunks: true}),
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"' + env + '"'
      }
    })
  ].concat(env === 'production' ? [] : [
      new webpack.HotModuleReplacementPlugin()
    ]),

  module: {
    loaders: [
      {
        test: /\.js$/,
        loaders: ['react-hot', 'babel?plugins=object-assign'],
        include: [path.join(__dirname, 'src')]
      },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract('style',
          'css?modules&sourceMap&localIdentName=[name]__[local]___[hash:base64:5]')
      }
    ],
    preLoaders: env === 'production' ? [] : [
      eslintLoader
    ]
  },

  resolve: {
    extensions: ['', '.js']
  },


  stats: {
    colors: true
  },


  eslint: {
    configFile: 'src/.eslintrc',
    // Treat all warnings as errors too
    emitError: true
  }
};

@@ -31,72 +31,8 @@
 ');%0A
-var ExtractTextPlugin = require('extract-text-webpack-plugin');%0A
 var 
@@ -163,52 +163,8 @@
 n';%0A
-var entry = process.env.ENTRY %7C%7C 'Example';%0A
 %0A%0Ava
@@ -353,21 +353,46 @@
 ple/
-' + entry + '
+reset.css',%0A    './src/example/Example
 .js'
@@ -661,67 +661,8 @@
 (),%0A
-    new ExtractTextPlugin('style.css', %7BallChunks: true%7D),%0A
     
@@ -887,33 +887,24 @@
 s: %5B%0A      %7B
-%0A        
 test: /%5C.js$
@@ -901,32 +901,24 @@
 st: /%5C.js$/,
-%0A       
  loaders: %5B'
@@ -939,87 +939,42 @@
 abel
-?plugins=object-assign'%5D,%0A        include: %5Bpath.join(__dirname, 'src')%5D%0A      
+'%5D, include: %5Bpath.resolve('src')%5D
 %7D,%0A 
@@ -1024,54 +1024,15 @@
 er: 
-ExtractTextPlugin.extract('style',%0A          '
+'style!
 css?
@@ -1098,17 +1098,16 @@
 se64:5%5D'
-)
 %0A      %7D
@@ -1321,70 +1321,209 @@
 trc'
-,%0A    // Treat all warnings as errors too%0A    emitErr
+%0A  %7D,%0A%0A%0A  devServer: %7B%0A    hot: true,%0A    historyApiFallback: true,%0A    stats: %7B%0A      // Do not show list of hundreds of files included in a bundle%0A      chunkModules: false,%0A      col
 or
+s
 : true%0A
+    %7D%0A
   %7D%0A

Update build config