* Returns } Object containing chunk entries and runtime chunk. * @param {Chunk} chunk The chunk to get information for * @param {ChunkGraph} chunkGraph The chunk graph containing the chunk * @returns {{ entries: [Module, Entrypoint | undefined][], runtimeChunk: Chunk | null }} Object containing c
(chunk, chunkGraph)
| 21 | * @returns {{ entries: [Module, Entrypoint | undefined][], runtimeChunk: Chunk | null }} Object containing chunk entries and runtime chunk |
| 22 | */ |
| 23 | function getChunkInfo(chunk, chunkGraph) { |
| 24 | const entries = [ |
| 25 | ...chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) |
| 26 | ]; |
| 27 | const runtimeChunk = |
| 28 | entries.length > 0 |
| 29 | ? /** @type {Entrypoint[][]} */ |
| 30 | (entries)[0][1].getRuntimeChunk() |
| 31 | : null; |
| 32 | |
| 33 | return { |
| 34 | entries, |
| 35 | runtimeChunk |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Creates a chunk hash handler |
no test coverage detected