Skip to content

Commit f75418f

Browse files
authored
Merge pull request webpack#5534 from webpack/bugfix/incorrect-graph
Ensure that graph structure stay consistent
2 parents 990563f + 99c2706 commit f75418f

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

lib/Module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class Module extends DependenciesBlock {
7373

7474
setChunks(chunks) {
7575
this._chunks = new SortableSet(chunks, sortById);
76+
this._chunksDebugIdent = undefined;
7677
}
7778

7879
addChunk(chunk) {

lib/optimize/EnsureChunkConditionsPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class EnsureChunkConditionsPlugin {
2222
chunk.parents.forEach((parent) => {
2323
if(!usedChunks.has(parent)) {
2424
parent.addModule(module);
25+
module.addChunk(parent);
2526
newChunks.push(parent);
2627
}
2728
});

lib/optimize/ModuleConcatenationPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ class ModuleConcatenationPlugin {
163163
}
164164
chunks.forEach(chunk => {
165165
chunk.addModule(newModule);
166+
newModule.addChunk(chunk);
166167
if(chunk.entryModule === concatConfiguration.rootModule)
167168
chunk.entryModule = newModule;
168169
});

0 commit comments

Comments
 (0)