Skip to content

Commit

Permalink
Fix typo and be clearer about ecma settings in uglifyjs options (#4239
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danielberndt authored and Timer committed Apr 2, 2018
1 parent 2824bf2 commit 9a99b5d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down

0 comments on commit 9a99b5d

Please sign in to comment.