File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -349,28 +349,26 @@ export class InstantiateModuleTransformer extends ModuleTransformer {
349
349
350
350
// then do export bindings of re-exported dependencies
351
351
if ( externalExportBindings ) {
352
- let reexports = { } ;
352
+ let reexports = Object . create ( null ) ;
353
353
externalExportBindings . forEach ( ( { exportName, importName} ) => {
354
354
reexports [ exportName ] = importName === null ?
355
355
parseExpression `$__m` : parseExpression `$__m.${ importName } ` ;
356
356
} ) ;
357
357
setterStatements . push (
358
- parseStatement `$__export(${ createObjectLiteral ( reexports ) } )`
359
- ) ;
358
+ parseStatement `$__export(${ createObjectLiteral ( reexports ) } )` ) ;
360
359
}
361
360
362
361
// create local module bindings
363
362
if ( moduleBinding ) {
364
363
setterStatements . push (
365
- parseStatement `${ id ( moduleBinding ) } = $__m;`
366
- ) ;
364
+ parseStatement `${ id ( moduleBinding ) } = $__m;` ) ;
367
365
}
368
366
369
367
// finally run export * if applying to this dependency, for not-already
370
368
// exported dependencies
371
369
if ( exportStarBinding ) {
372
370
setterStatements = setterStatements . concat ( parseStatements `
373
- var exportObj = {} ;
371
+ var exportObj = Object.create(null) ;
374
372
Object.keys($__m).forEach(function(p) {
375
373
if (p !== 'default' && !$__exportNames[p])
376
374
exportObj[p] = $__m[p];
You can’t perform that action at this time.
0 commit comments