(module)
| 969 | * @returns {Iterable<Chunk[]>} groups of chunks with equal exports |
| 970 | */ |
| 971 | const groupChunksByExports = (module) => { |
| 972 | const exportsInfo = moduleGraph.getExportsInfo(module); |
| 973 | /** @type {Map<string, Chunk[]>} */ |
| 974 | const groupedByUsedExports = new Map(); |
| 975 | for (const chunk of chunkGraph.getModuleChunksIterable(module)) { |
| 976 | const key = exportsInfo.getUsageKey(chunk.runtime); |
| 977 | const list = groupedByUsedExports.get(key); |
| 978 | if (list !== undefined) { |
| 979 | list.push(chunk); |
| 980 | } else { |
| 981 | groupedByUsedExports.set(key, [chunk]); |
| 982 | } |
| 983 | } |
| 984 | return groupedByUsedExports.values(); |
| 985 | }; |
| 986 | |
| 987 | /** @type {Map<Module, Iterable<Chunk[]>>} */ |
| 988 | const groupedByExportsMap = new Map(); |
nothing calls this directly
no test coverage detected