()
| 1031 | }; |
| 1032 | |
| 1033 | const processConnectQueue = () => { |
| 1034 | // Figure out new parents for chunk groups |
| 1035 | // to get new available modules for these children |
| 1036 | for (const [chunkGroupInfo, targets] of queueConnect) { |
| 1037 | // 1. Add new targets to the list of children |
| 1038 | if (chunkGroupInfo.children === undefined) { |
| 1039 | chunkGroupInfo.children = new Set(); |
| 1040 | } |
| 1041 | for (const [target] of targets) { |
| 1042 | chunkGroupInfo.children.add(target); |
| 1043 | } |
| 1044 | |
| 1045 | // 2. Calculate resulting available modules |
| 1046 | const resultingAvailableModules = |
| 1047 | calculateResultingAvailableModules(chunkGroupInfo); |
| 1048 | |
| 1049 | const runtime = chunkGroupInfo.runtime; |
| 1050 | |
| 1051 | // 3. Update chunk group info |
| 1052 | for (const [target, processBlock] of targets) { |
| 1053 | target.availableModulesToBeMerged.push(resultingAvailableModules); |
| 1054 | chunkGroupsForMerging.add([target, processBlock]); |
| 1055 | const oldRuntime = target.runtime; |
| 1056 | const newRuntime = mergeRuntime(oldRuntime, runtime); |
| 1057 | if (oldRuntime !== newRuntime) { |
| 1058 | target.runtime = newRuntime; |
| 1059 | outdatedChunkGroupInfo.add(target); |
| 1060 | } |
| 1061 | } |
| 1062 | |
| 1063 | statConnectedChunkGroups += targets.size; |
| 1064 | } |
| 1065 | queueConnect.clear(); |
| 1066 | }; |
| 1067 | |
| 1068 | const processChunkGroupsForMerging = () => { |
| 1069 | statProcessedChunkGroupsForMerging += chunkGroupsForMerging.size; |
no test coverage detected