From 51023fbd64482d5f4e704423ba21bc97299b0fc4 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 30 Dec 2016 07:21:38 +0000 Subject: [PATCH] Make webpack config better for production --- webpack.production.config.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webpack.production.config.js b/webpack.production.config.js index f2be7fb..ff64663 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -2,7 +2,7 @@ var path = require('path'); var webpack = require('webpack'); module.exports = { - devtool: 'source-map', + devtool: 'cheap-module-source-map', entry: [ './src/index' ], @@ -14,10 +14,15 @@ module.exports = { plugins: [ new webpack.HotModuleReplacementPlugin(), new webpack.optimize.UglifyJsPlugin({ - compressor: { + compress: { warnings: false } }), + new webpack.DefinePlugin({ + 'process.env': { + 'NODE_ENV': JSON.stringify('production') + } + }), new webpack.NoErrorsPlugin() ], module: {