File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 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
3131
3232const external = Object . keys ( pkg . dependencies || { } ) ;
3333const uglifyOptions = {
34- mangle : true ,
34+ mangle : {
35+ // Hack for a bug in Closure regarding switch block scope
36+ reserved : [ '__PRIVATE_lastReasonableEscapeIndex' ]
37+ } ,
3538 webkit : true // Necessary to avoid https://bugs.webkit.org/show_bug.cgi?id=223533
3639} ;
3740
Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ const manglePrivatePropertiesOptions = {
150150 // This can be removed if the problem in the downstream library is fixed
151151 // or if terser's mangler provides an option to avoid mangling everything
152152 // that isn't a property.
153+ // `lastReasonableEscapeIndex` was causing problems in a switch statement
154+ // due to a Closure bug.
153155 // See issue: https://github.com/firebase/firebase-js-sdk/issues/5384
154- reserved : [ '_getProvider' ] ,
156+ reserved : [ '_getProvider' , '__PRIVATE_lastReasonableEscapeIndex' ] ,
155157 properties : {
156158 regex : / ^ _ _ P R I V A T E _ / ,
157159 // 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