From 9b7e2e50e3fd0a8b81a3cddc0f7240b894778c65 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 21 Nov 2016 20:56:36 -0500 Subject: Fxing source maps for production (#4621) --- webapp/webpack.config.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js index 71e35a6d8..f1742e3ae 100644 --- a/webapp/webpack.config.js +++ b/webapp/webpack.config.js @@ -99,11 +99,6 @@ var config = { } } }), - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: JSON.stringify('production') - } - }), new webpack.optimize.CommonsChunkPlugin({ minChunks: 2, children: true @@ -143,12 +138,20 @@ if (!DEV) { compress: { warnings: false }, - comments: false + comments: false, + sourceMap: true }) ); config.plugins.push( new webpack.optimize.OccurrenceOrderPlugin(true) ); + config.plugins.push( + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: JSON.stringify('production') + } + }) + ); } // Test mode configuration -- cgit v1.2.3-1-g7c22