mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
fix: code split fails with common module (#4151)
This commit is contained in:
@@ -140,12 +140,12 @@ class RegisterAsyncChunksPlugin {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
!chunkModuleMemory[sourceChunkId].includes(urlPath) &&
|
!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}');`);
|
reg.push(`flarum.reg.addChunkModule('${chunkId}', '${moduleId}', '${namespace}', '${urlPath}');`);
|
||||||
chunkModuleMemory[sourceChunkId].push(urlPath);
|
chunkModuleMemory[sourceChunkId].push(urlPath);
|
||||||
RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`] ||= [];
|
RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`] ||= [];
|
||||||
RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`].push(urlPath);
|
RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`].push(urlPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user