Skip to content

Commit bd76528

Browse files
committed
Invalidate concatenated module on dep change
When the moduleSet for a given concatenated module changed, the source for the embedded modules would not necessarily, which lead to caching mismatch between the source and the modulesWithInfo structure. Fixes webpack#6168
1 parent ec83e8e commit bd76528

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/optimize/ConcatenatedModule.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,12 @@ class ConcatenatedModule extends Module {
576576
moduleToInfoMap
577577
)
578578
);
579+
580+
// Must use full identifier in our cache here to ensure that the source
581+
// is updated should our dependencies list change.
579582
innerDependencyTemplates.set(
580583
"hash",
581-
innerDependencyTemplates.get("hash") + this.rootModule.identifier()
584+
innerDependencyTemplates.get("hash") + this.identifier()
582585
);
583586

584587
// Generate source code and analyse scopes

0 commit comments

Comments
 (0)