* @private * @returns {void}
()
| 5364 | * @returns {void} |
| 5365 | */ |
| 5366 | _buildAssetToChunkIndex() { |
| 5367 | if (this._assetToChunkIndex !== undefined) return; |
| 5368 | /** @type {Map<string, Set<Chunk>>} */ |
| 5369 | const filesIndex = new Map(); |
| 5370 | /** @type {Map<string, Set<Chunk>>} */ |
| 5371 | const auxiliaryIndex = new Map(); |
| 5372 | for (const chunk of this.chunks) { |
| 5373 | for (const file of chunk.files) { |
| 5374 | let set = filesIndex.get(file); |
| 5375 | if (set === undefined) filesIndex.set(file, (set = new Set())); |
| 5376 | set.add(chunk); |
| 5377 | } |
| 5378 | for (const file of chunk.auxiliaryFiles) { |
| 5379 | let set = auxiliaryIndex.get(file); |
| 5380 | if (set === undefined) auxiliaryIndex.set(file, (set = new Set())); |
| 5381 | set.add(chunk); |
| 5382 | } |
| 5383 | } |
| 5384 | this._assetToChunkIndex = filesIndex; |
| 5385 | this._assetToChunkAuxiliaryIndex = auxiliaryIndex; |
| 5386 | } |
| 5387 | |
| 5388 | /** |
| 5389 | * @private |
no test coverage detected