From 067eb1940d0b7e4dfb59bddf58123c70b0938d80 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Fri, 17 Nov 2017 10:04:57 -0500 Subject: [PATCH] Only uglify if building for production. Uglify was trying to run always, including the dev-server output, which included es6 that broke uglifier. --- webpack.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 9db7ea8..677caf4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,13 +27,12 @@ const base = { } ] }, - plugins: [ + plugins: process.env.NODE_ENV === 'production' ? [ new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/, - minimize: true, - sourceMap: true + minimize: true }) - ] + ] : [] }; module.exports = [