We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ecma
1 parent 2824bf2 commit 9a99b5dCopy full SHA for 9a99b5d
packages/react-scripts/config/webpack.config.prod.js
@@ -379,9 +379,10 @@ module.exports = {
379
new UglifyJsPlugin({
380
uglifyOptions: {
381
parse: {
382
- // we want uglify-js to parse ecma 8 code. However we want it to output
383
- // ecma 5 compliant code, to avoid issues with older browsers, this is
384
- // 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'
385
+ // sections only apply transformations that are ecma 5 safe
386
// https://github.com/facebook/create-react-app/pull/4234
387
ecma: 8,
388
},
0 commit comments