Fix shadowing issue on UMD format (#499)
This commit is contained in:
parent
cd02806c94
commit
ea688abd02
|
@ -1539,6 +1539,7 @@ function generateJS( ast, options ) {
|
||||||
const requires = dependencyIds
|
const requires = dependencyIds
|
||||||
.map( id => `require("${ js.stringEscape( id ) }")` )
|
.map( id => `require("${ js.stringEscape( id ) }")` )
|
||||||
.join( ", " );
|
.join( ", " );
|
||||||
|
const args = dependencyVars.map( v => "root." + v ).join( ", " );
|
||||||
const params = dependencyVars.join( ", " );
|
const params = dependencyVars.join( ", " );
|
||||||
|
|
||||||
parts.push( [
|
parts.push( [
|
||||||
|
@ -1554,7 +1555,7 @@ function generateJS( ast, options ) {
|
||||||
|
|
||||||
parts.push( [
|
parts.push( [
|
||||||
" } else {",
|
" } else {",
|
||||||
" root." + options.exportVar + " = factory();"
|
" root." + options.exportVar + " = factory(" + args + ");"
|
||||||
].join( "\n" ) );
|
].join( "\n" ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue