Skip to content

Commit

Permalink
fix(gatsby): Prevent minifier from compressing output using ES6+ synt…
Browse files Browse the repository at this point in the history
…ax (#9135)
  • Loading branch information
shanekenney authored and pieh committed Oct 16, 2018
1 parent 2707953 commit fed6d35
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/gatsby/src/utils/webpack-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,16 @@ module.exports = async ({
exclude: /\.min\.js/,
sourceMap: true,
terserOptions: {
ecma: 8,
ie8: false,
parse: {
ecma: 8,
},
compress: {
ecma: 5,
},
output: {
ecma: 5,
},
...terserOptions,
},
...options,
Expand Down

0 comments on commit fed6d35

Please sign in to comment.