From 9114aea7acc2c97f3bdb575bc5216eb0935e5b94 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 d50520d18..7e7e2a01d 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -266,6 +266,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,