import _ from 'underscore';
import path from 'path';
import webpack from 'webpack';
import baseConfig from './base.config';

export default _.extend({}, baseConfig, {
  entry: [
    'webpack-dev-server/client?http://0.0.0.0:8080',
    'webpack/hot/only-dev-server',
    './playground/app'
  ],

  output: {
    path: path.join(__dirname, '../dist'),
    filename: 'playground.js'
  },

  plugins: (function(){
    if (process.env.NODE_ENV !== 'production')
      return [new webpack.HotModuleReplacementPlugin()]
  })(),

  devtool: 'source-map'
});

@@ -122,65 +122,282 @@
 ';%0A%0A
-export default _.extend(%7B%7D, baseConfig, %7B%0A  entry: %5B%0A    
+const isProduction = process.env.NODE_ENV === 'production';%0A%0Aexport default _.extend(%7B%7D, baseConfig, %7B%0A  entry: (function() %7B%0A    let array = %5B%0A      './playground/app'%0A    %5D;%0A%0A    if (!isProduction) %7B%0A      array.unshift('webpack/hot/only-dev-server');%0A      array.unshift(
 'web
@@ -443,71 +443,43 @@
 080'
-,
+);
 %0A    
-'webpack/hot/only-dev-server',%0A    './playground/app'%0A  %5D
+%7D%0A%0A    return array;%0A%0A  %7D)()
 ,%0A%0A 
@@ -590,16 +590,17 @@
 nction()
+ 
 %7B%0A    if
@@ -605,35 +605,12 @@
 if (
-process.env.NODE_ENV !== 'p
+!isP
 rodu
@@ -614,18 +614,19 @@
 oduction
-'
 )
+ %7B
 %0A      r
@@ -673,16 +673,39 @@
 lugin()%5D
+;%0A    %7D%0A%0A    return %5B%5D;
 %0A  %7D)(),

Use the isProduction flag