var webpack = require('webpack');
var precss = require('precss');
var autoprefixer = require('autoprefixer');
var postcssGradientFixer = require('postcss-gradientfixer')

module.exports = {
  entry: [
    './src/js/main.js'
  ],
  module: {
    loaders: [
      { test: /\.css$/, loader: 'style-loader!css-loader!postcss-loader' },
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: ['babel'],
        query: {
          'presets': ['react', 'es2015'],
          'plugins': [
            'transform-object-rest-spread'
          ]
        }
      }
    ]
  },
  postcss: function () {
    return [precss, autoprefixer({ browsers: ['> 5%'] }), postcssGradientFixer]
  },
  resolve: {
    extensions: ['', '.js']
  },
  output: {
    path: __dirname + '/dist',
    filename: './js/classification.js'
  }
}

@@ -738,16 +738,152 @@
 '%5D%0A  %7D,%0A
+  plugins: %5B%0A    new webpack.DefinePlugin(%7B%0A      'process.env': %7B%0A        'NODE_ENV': JSON.stringify('production')%0A      %7D%0A    %7D)%0A  %5D,%0A
   output

Add environment variable to webpack config