File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ import { emitModulePackageFile } from '../../../scripts/build/rollup_emit_module
31
31
32
32
const external = Object . keys ( pkg . dependencies || { } ) ;
33
33
const uglifyOptions = {
34
- mangle : true ,
34
+ mangle : {
35
+ // Hack for a bug in Closure regarding switch block scope
36
+ reserved : [ '__PRIVATE_lastReasonableEscapeIndex' ]
37
+ } ,
35
38
webkit : true // Necessary to avoid https://bugs.webkit.org/show_bug.cgi?id=223533
36
39
} ;
37
40
Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ const manglePrivatePropertiesOptions = {
150
150
// This can be removed if the problem in the downstream library is fixed
151
151
// or if terser's mangler provides an option to avoid mangling everything
152
152
// that isn't a property.
153
+ // `lastReasonableEscapeIndex` was causing problems in a switch statement
154
+ // due to a Closure bug.
153
155
// See issue: https://github.com/firebase/firebase-js-sdk/issues/5384
154
- reserved : [ '_getProvider' ] ,
156
+ reserved : [ '_getProvider' , '__PRIVATE_lastReasonableEscapeIndex' ] ,
155
157
properties : {
156
158
regex : / ^ _ _ P R I V A T E _ / ,
157
159
// All JS Keywords are reserved. Although this should be taken cared of by
You can’t perform that action at this time.
0 commit comments