File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ 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
+ reserved : [ '_getProvider' ] ,
148
154
properties : {
149
155
regex : / ^ _ _ P R I V A T E _ / ,
150
156
// All JS Keywords are reserved. Although this should be taken cared of by
@@ -284,7 +290,12 @@ exports.es2017ToEs5Plugins = function (mangled = false) {
284
290
comments : 'all' ,
285
291
beautify : true
286
292
} ,
287
- mangle : true
293
+ // See comment above `manglePrivatePropertiesOptions`. This build did
294
+ // not have the identical variable name issue but we should be
295
+ // consistent.
296
+ mangle : {
297
+ reserved : [ '_getProvider' ]
298
+ }
288
299
} ) ,
289
300
sourcemaps ( )
290
301
] ;
You can’t perform that action at this time.
0 commit comments