From 9a99b5d190c70006f61b6bb86d8e16cdb22be8f5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 2 Apr 2018 21:17:24 +0200 Subject: [PATCH] Fix typo and be clearer about `ecma` settings in uglifyjs options (#4239) --- packages/react-scripts/config/webpack.config.prod.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index e76f67d60d2..b3c4a602cd4 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -379,9 +379,10 @@ module.exports = { new UglifyJsPlugin({ uglifyOptions: { parse: { - // we want uglify-js to parse ecma 8 code. However we want it to output - // ecma 5 compliant code, to avoid issues with older browsers, this is - // whey we put `ecma: 5` to the compress and output section + // we want uglify-js to parse ecma 8 code. However, we don't want it + // to apply any minfication steps that turns valid ecma 5 code + // into invalid ecma 5 code. This is why the 'compress' and 'output' + // sections only apply transformations that are ecma 5 safe // https://github.com/facebook/create-react-app/pull/4234 ecma: 8, },