MCPcopy
hub / github.com/webpack/webpack / createModuleAssets

Method createModuleAssets

lib/Compilation.js:5505–5528  ·  lib/Compilation.js::Compilation.createModuleAssets
()

Source from the content-addressed store, hash-verified

5503 }
5504
5505 createModuleAssets() {
5506 const { chunkGraph } = this;
5507 for (const module of this.modules) {
5508 const buildInfo = /** @type {BuildInfo} */ (module.buildInfo);
5509 if (buildInfo.assets) {
5510 const assetsInfo = buildInfo.assetsInfo;
5511 for (const assetName of Object.keys(buildInfo.assets)) {
5512 const fileName = this.getPath(assetName, {
5513 chunkGraph: this.chunkGraph,
5514 module
5515 });
5516 for (const chunk of chunkGraph.getModuleChunksIterable(module)) {
5517 chunk.auxiliaryFiles.add(fileName);
5518 }
5519 this.emitAsset(
5520 fileName,
5521 buildInfo.assets[assetName],
5522 assetsInfo ? assetsInfo.get(assetName) : undefined
5523 );
5524 this.hooks.moduleAsset.call(module, fileName);
5525 }
5526 }
5527 }
5528 }
5529
5530 /**
5531 * Gets render manifest.

Callers 1

sealMethod · 0.95

Calls 7

getPathMethod · 0.95
emitAssetMethod · 0.95
keysMethod · 0.65
addMethod · 0.45
getMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected