Skip to content

Commit f4d31b8

Browse files
davidascherromaindso
authored andcommitted
Disable comparisons feature in uglify compression in production (facebook#2379)
* Disable a micro-option in uglify that appears to be buggy See facebook#2376 * wrong plugin * Add a comment
1 parent c86ffb6 commit f4d31b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-scripts/config/webpack.config.prod.js

+5
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ module.exports = {
282282
new webpack.optimize.UglifyJsPlugin({
283283
compress: {
284284
warnings: false,
285+
// Disabled because of an issue with Uglify breaking seemingly valid code:
286+
// https://github.com/facebookincubator/create-react-app/issues/2376
287+
// Pending further investigation:
288+
// https://github.com/mishoo/UglifyJS2/issues/2011
289+
comparisons: false,
285290
},
286291
output: {
287292
comments: false,

0 commit comments

Comments
 (0)