mirror of https://github.com/webpack/webpack.git
refactor top level declarations
- add topLevelDeclarations to code generation results - set topLevelDeclarations=undefined if any child topLevelDeclarations=undefined
This commit is contained in:
parent
58a2fd01c4
commit
de7ec7bc07
|
|
@ -243,7 +243,7 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin {
|
|||
if (topLevelDeclarations.has(base))
|
||||
return topLevelDeclarationContradictionError(base);
|
||||
const { data } = codeGenerationResults.get(module, chunk.runtime);
|
||||
topLevelDeclarations = data.get("topLevelDeclarations");
|
||||
topLevelDeclarations = data && data.get("topLevelDeclarations");
|
||||
if (topLevelDeclarations && topLevelDeclarations.has(base)) {
|
||||
return topLevelDeclarationContradictionError(base);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue