( chunk, chunkGraph, context, delimiter, hashFunction, associatedObjectForCache )
| 167 | * @returns {string} short chunk name |
| 168 | */ |
| 169 | const getLongChunkName = ( |
| 170 | chunk, |
| 171 | chunkGraph, |
| 172 | context, |
| 173 | delimiter, |
| 174 | hashFunction, |
| 175 | associatedObjectForCache |
| 176 | ) => { |
| 177 | const modules = chunkGraph.getChunkRootModules(chunk); |
| 178 | const shortModuleNames = modules.map((m) => |
| 179 | requestToId(getShortModuleName(m, context, associatedObjectForCache)) |
| 180 | ); |
| 181 | const longModuleNames = modules.map((m) => |
| 182 | requestToId( |
| 183 | getLongModuleName("", m, context, hashFunction, associatedObjectForCache) |
| 184 | ) |
| 185 | ); |
| 186 | chunk.idNameHints.sort(); |
| 187 | const chunkName = [ |
| 188 | ...chunk.idNameHints, |
| 189 | ...shortModuleNames, |
| 190 | ...longModuleNames |
| 191 | ] |
| 192 | .filter(Boolean) |
| 193 | .join(delimiter); |
| 194 | return shortenLongString(chunkName, delimiter, hashFunction); |
| 195 | }; |
| 196 | |
| 197 | /** |
| 198 | * Gets full chunk name. |
no test coverage detected