Skip to content

Commit 9a99b5d

Browse files
danielberndtTimer
authored andcommitted
Fix typo and be clearer about ecma settings in uglifyjs options (#4239)
1 parent 2824bf2 commit 9a99b5d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,10 @@ module.exports = {
379379
new UglifyJsPlugin({
380380
uglifyOptions: {
381381
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
382+
// we want uglify-js to parse ecma 8 code. However, we don't want it
383+
// to apply any minfication steps that turns valid ecma 5 code
384+
// into invalid ecma 5 code. This is why the 'compress' and 'output'
385+
// sections only apply transformations that are ecma 5 safe
385386
// https://github.com/facebook/create-react-app/pull/4234
386387
ecma: 8,
387388
},

0 commit comments

Comments
 (0)