From 5d26485c04099ab207648736fc3bf21318eef733 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Fri, 3 Jan 2025 15:16:37 +0100 Subject: [PATCH] fix: code split fails with common module (#4151) --- .../webpack-config/src/RegisterAsyncChunksPlugin.cjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js-packages/webpack-config/src/RegisterAsyncChunksPlugin.cjs b/js-packages/webpack-config/src/RegisterAsyncChunksPlugin.cjs index 18a8b30cd0..72c8fdd287 100644 --- a/js-packages/webpack-config/src/RegisterAsyncChunksPlugin.cjs +++ b/js-packages/webpack-config/src/RegisterAsyncChunksPlugin.cjs @@ -140,12 +140,12 @@ class RegisterAsyncChunksPlugin { if ( !chunkModuleMemory[sourceChunkId].includes(urlPath) && - !RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`]?.includes(urlPath) + !RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`]?.includes(urlPath) ) { reg.push(`flarum.reg.addChunkModule('${chunkId}', '${moduleId}', '${namespace}', '${urlPath}');`); chunkModuleMemory[sourceChunkId].push(urlPath); - RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`] ||= []; - RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`].push(urlPath); + RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`] ||= []; + RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`].push(urlPath); } });