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
|
||||
.map( id => `require("${ js.stringEscape( id ) }")` )
|
||||
.join( ", " );
|
||||
const args = dependencyVars.map( v => "root." + v ).join( ", " );
|
||||
const params = dependencyVars.join( ", " );
|
||||
|
||||
parts.push( [
|
||||
|
@ -1554,7 +1555,7 @@ function generateJS( ast, options ) {
|
|||
|
||||
parts.push( [
|
||||
" } else {",
|
||||
" root." + options.exportVar + " = factory();"
|
||||
" root." + options.exportVar + " = factory(" + args + ");"
|
||||
].join( "\n" ) );
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue