From 3cc77e95894e25a1bfc5ae0bf8b1d146f363af47 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 --- config/webpack.config.prod.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index fec81bc..5943c14 100644 --- a/config/webpack.config.prod.js +++ b/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,