Skip to content

Commit

Permalink
Output and compress to es6 to enable tree-shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Chen committed Jun 5, 2018
1 parent 185e5e3 commit 386036b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,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
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8
},
compress: {
ecma: 5,
ecma: 6,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
Expand All @@ -293,7 +289,7 @@ module.exports = {
safari10: true
},
output: {
ecma: 5,
ecma: 6,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
Expand Down

0 comments on commit 386036b

Please sign in to comment.