Skip to content

Commit

Permalink
fix(service): improved terser options for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jan 23, 2019
1 parent 25f394d commit 19e9571
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/@nodepack/service/src/config/terserOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ module.exports = options => ({
typeofs: false,

// a few flags with noticable gains/speed ratio
// numbers based on out of the box vendor bundle
booleans: true, // 0.7kb
if_return: true, // 0.4kb
sequences: true, // 0.7kb
unused: true, // 2.3kb
booleans: true,
if_return: true,
sequences: true,
unused: true,

// required features to drop conditional branches
conditionals: true,
Expand All @@ -33,6 +32,10 @@ module.exports = options => ({
},
mangle: {
safari10: true,

// compatibility
keep_classnames: true,
keep_fnames: true,
},
},
sourceMap: options.productionSourceMap,
Expand Down

0 comments on commit 19e9571

Please sign in to comment.