From d5a5425dc53b7b90be0abe638e4d7953671c8999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 8 Aug 2017 13:11:32 -0700 Subject: [PATCH] Enable source map generation in UglifyJsPlugin Looks like it was disabled at some point and depending on the version of webpack it's enabled by default or not: https://github.com/webpack/webpack/issues/2704#issuecomment-228860162 So it was working with 3.3.0 but now fails with 3.4.1, this PR fixes it --- webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index fc1fa5b38..517606f8b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -112,7 +112,9 @@ const isDev = (process.env.NODE_ENV === "test"); // enable production only plugins if (!isDev) { - config.plugins.push(new webpack.optimize.UglifyJsPlugin()); + config.plugins.push(new webpack.optimize.UglifyJsPlugin({ + sourceMap: true + })); config.plugins.push(new webpack.LoaderOptionsPlugin({ minimize: true, debug: false,