add missing chunk groups to HotUpdateChunks

This commit is contained in:
Tobias Koppers 2020-09-24 20:28:08 +02:00
parent f7443ea094
commit fac6c5241f
1 changed files with 4 additions and 0 deletions

View File

@ -461,6 +461,10 @@ class HotModuleReplacementPlugin {
ChunkGraph.setChunkGraphForChunk(hotUpdateChunk, chunkGraph);
hotUpdateChunk.id = chunkId;
hotUpdateChunk.runtime = newRuntime;
if (currentChunk) {
for (const group of currentChunk.groupsIterable)
hotUpdateChunk.addGroup(group);
}
chunkGraph.attachModules(hotUpdateChunk, newModules || []);
chunkGraph.attachRuntimeModules(
hotUpdateChunk,