(chunks)
| 26 | * @returns {void} |
| 27 | */ |
| 28 | const handler = (chunks) => { |
| 29 | const chunkGraph = compilation.chunkGraph; |
| 30 | for (const chunk of chunks) { |
| 31 | if ( |
| 32 | chunkGraph.getNumberOfChunkModules(chunk) === 0 && |
| 33 | !chunk.hasRuntime() && |
| 34 | chunkGraph.getNumberOfEntryModules(chunk) === 0 |
| 35 | ) { |
| 36 | compilation.chunkGraph.disconnectChunk(chunk); |
| 37 | compilation.chunks.delete(chunk); |
| 38 | } |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | compilation.hooks.optimizeChunks.tap( |
| 43 | { |
nothing calls this directly
no test coverage detected