From 666c6287625363064def6eae8471f9179d110703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Thu, 11 Jul 2019 05:12:49 +0100 Subject: [PATCH] Disable the uglify plugin We have an old version of uglify, and it's causing problems with compiling d3-array, and also when upgrading to a newer babel. I'm going to disable it for now, then upgrade babel, and then upgrade webpack. Upgrading webpack will get us a later version of uglify without these issues. --- config/webpack.config.web.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/config/webpack.config.web.js b/config/webpack.config.web.js index 9b57f1c..176d156 100644 --- a/config/webpack.config.web.js +++ b/config/webpack.config.web.js @@ -254,27 +254,6 @@ function plugins(mode /*: "development" | "production" */) { const prodOnlyPlugins = [ // Remove the output directory before starting the build. new RemoveBuildDirectoryPlugin(), - // Minify the code. - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false, - // Disabled because of an issue with Uglify breaking seemingly valid code: - // https://github.com/facebookincubator/create-react-app/issues/2376 - // Pending further investigation: - // https://github.com/mishoo/UglifyJS2/issues/2011 - comparisons: false, - }, - mangle: { - safari10: true, - }, - output: { - comments: false, - // Turned on because emoji and regex is not minified properly using default - // https://github.com/facebookincubator/create-react-app/issues/2488 - ascii_only: true, - }, - sourceMap: shouldUseSourceMap, - }), ]; switch (mode) { case "development":