Skip to content

Commit b58fd64

Browse files
toddselfgoto-bus-stop
authored andcommitted
Enable Safari 10 save mangling (#3)
Safari 10 has an issue with `let` and redeclarations; the only way to safely let uglify mangle and generate a build capable of supporting Safari 10 is to enable the specific Safari 10 option. No. Seriously. mishoo/UglifyJS#1753 (comment) There is no noticable bundle size difference with this enabled | type | safari10: true | safari10: false| ----------------------------------------- | uncompressed | 494k | 489k | | brotli | 130k | 134k | | gzip | 154k | 148k | | deflate | 154k | 148k | So somehow this is making Brotli more efficient. And the only browser that doesn't support Brotli? Safari 10. So win-win everywhere!
1 parent f75ff84 commit b58fd64

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.index.js.swp

12 KB
Binary file not shown.

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ module.exports = function (b, opts) {
4545
var uglifyOpts = {
4646
output: {
4747
ascii_only: true
48+
},
49+
mangle: {
50+
safari10: true
4851
}
4952
}
5053
if (!b._options.debug) {

0 commit comments

Comments
 (0)