File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @firebase/firestore ' : patch
3
+ ---
4
+
5
+ Temporary fix for a bug causing ` initializeFirestore() ` to not work with certain bundling pipelines.
Original file line number Diff line number Diff line change @@ -145,6 +145,13 @@ const manglePrivatePropertiesOptions = {
145
145
beautify : true
146
146
} ,
147
147
mangle : {
148
+ // Temporary hack fix for an issue where mangled code causes some downstream
149
+ // bundlers (Babel?) to confuse the same variable name in different scopes.
150
+ // This can be removed if the problem in the downstream library is fixed
151
+ // or if terser's mangler provides an option to avoid mangling everything
152
+ // that isn't a property.
153
+ // See issue: https://github.com/firebase/firebase-js-sdk/issues/5384
154
+ reserved : [ '_getProvider' ] ,
148
155
properties : {
149
156
regex : / ^ _ _ P R I V A T E _ / ,
150
157
// All JS Keywords are reserved. Although this should be taken cared of by
@@ -284,7 +291,12 @@ exports.es2017ToEs5Plugins = function (mangled = false) {
284
291
comments : 'all' ,
285
292
beautify : true
286
293
} ,
287
- mangle : true
294
+ // See comment above `manglePrivatePropertiesOptions`. This build did
295
+ // not have the identical variable name issue but we should be
296
+ // consistent.
297
+ mangle : {
298
+ reserved : [ '_getProvider' ]
299
+ }
288
300
} ) ,
289
301
sourcemaps ( )
290
302
] ;
You can’t perform that action at this time.
0 commit comments