mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 07:42:48 +08:00
fix: code split fails with common module (#4151)
This commit is contained in:
parent
38e1b49cc1
commit
5d26485c04
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user