var path = require('path'),
    webpack = require('webpack')

const NODE_ENV = process.env.NODE_ENV || 'development'

var config = {
  entry: [
    path.join(__dirname, 'src/index.js')
  ],
  output: {
    path: path.join(__dirname, 'build'),
    publicPath: '/build/',
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {test: /\.js$/, exclude: /node_modules/, loaders: ['babel-loader?stage=0']}
    ]
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin({
      output:{
        comments: false
      },
      compressor: {
        warnings: false
      }
    })
  ],
}

if (NODE_ENV === "development") {
  config.entry.push('webpack-dev-server/client?http://0.0.0.0:3000')
  config.devtool = "inline-source-map"

  config.plugins = [
    new webpack.NoErrorsPlugin()
  ]
}

module.exports = config

@@ -575,16 +575,114 @@
 %7D%0A    %7D)
+,%0A    new webpack.DefinePlugin(%7B%0A        %22process.env.NODE_ENV%22: JSON.stringify(NODE_ENV),%0A    %7D),
 %0A  %5D,%0A%7D%0A

Add define plugin in webpack config