( chunk, chunkGraph, context, delimiter, hashFunction, associatedObjectForCache )
| 138 | * @returns {string} short chunk name |
| 139 | */ |
| 140 | const getShortChunkName = ( |
| 141 | chunk, |
| 142 | chunkGraph, |
| 143 | context, |
| 144 | delimiter, |
| 145 | hashFunction, |
| 146 | associatedObjectForCache |
| 147 | ) => { |
| 148 | const modules = chunkGraph.getChunkRootModules(chunk); |
| 149 | const shortModuleNames = modules.map((m) => |
| 150 | requestToId(getShortModuleName(m, context, associatedObjectForCache)) |
| 151 | ); |
| 152 | chunk.idNameHints.sort(); |
| 153 | const chunkName = [...chunk.idNameHints, ...shortModuleNames] |
| 154 | .filter(Boolean) |
| 155 | .join(delimiter); |
| 156 | return shortenLongString(chunkName, delimiter, hashFunction); |
| 157 | }; |
| 158 | |
| 159 | /** |
| 160 | * Gets long chunk name. |
no test coverage detected