(compilation, allCreatedChunkGroups)
| 1402 | * @param {Iterable<ChunkGroup>} allCreatedChunkGroups all chunk groups that where created before |
| 1403 | */ |
| 1404 | const cleanupUnconnectedGroups = (compilation, allCreatedChunkGroups) => { |
| 1405 | const { chunkGraph } = compilation; |
| 1406 | |
| 1407 | for (const chunkGroup of allCreatedChunkGroups) { |
| 1408 | if (chunkGroup.getNumberOfParents() === 0) { |
| 1409 | for (const chunk of chunkGroup.chunks) { |
| 1410 | compilation.chunks.delete(chunk); |
| 1411 | chunkGraph.disconnectChunk(chunk); |
| 1412 | } |
| 1413 | chunkGraph.disconnectChunkGroup(chunkGroup); |
| 1414 | chunkGroup.remove(); |
| 1415 | } |
| 1416 | } |
| 1417 | }; |
| 1418 | |
| 1419 | /** |
| 1420 | * This method creates the Chunk graph from the Module graph |
no test coverage detected