var path = require('path');
var webpack = require('webpack');
var merge = require('webpack-merge');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');

var webpackBase = require('./webpack.base.js');

module.exports = merge(webpackBase, {
  plugins: [
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': '"production"'
    }),

    new HtmlWebpackPlugin({
      inject: 'body',
      template: path.resolve(__dirname, '../src/index.html'),
      minify: {
        caseSensitive: true,
        collapseWhitespace: true
      },
      favicon: path.resolve(__dirname, '../src/assets/images/favicon.ico')
    }),
    new WebpackCleanupPlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.optimize.UglifyJsPlugin({
      compressor: {
        warnings: false
      }
    }),
  ]
});

@@ -365,17 +365,29 @@
 .env
-.
+': %7B%0A        
 NODE_ENV
 ': '
@@ -382,17 +382,16 @@
 NODE_ENV
-'
 : '%22prod
@@ -399,16 +399,24 @@
 ction%22'%0A
+      %7D%0A
     %7D),%0A

Refactor process.env on webpack production