From f4d31b8cc9f3abfaa7918cae670cabb497d654e9 Mon Sep 17 00:00:00 2001 From: David Ascher Date: Sat, 27 May 2017 04:36:42 -0700 Subject: [PATCH] Disable comparisons feature in uglify compression in production (#2379) * Disable a micro-option in uglify that appears to be buggy See https://github.com/facebookincubator/create-react-app/issues/2376 * wrong plugin * Add a comment --- packages/react-scripts/config/webpack.config.prod.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index fec81bcabb7..5943c14502c 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -282,6 +282,11 @@ module.exports = { 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, }, output: { comments: false,