MCPcopy
hub / github.com/webpack/webpack / getAssets

Method getAssets

lib/Compilation.js:5467–5480  ·  lib/Compilation.js::Compilation.getAssets
()

Source from the content-addressed store, hash-verified

5465 }
5466
5467 getAssets() {
5468 /** @type {Readonly<Asset>[]} */
5469 const array = [];
5470 for (const assetName of Object.keys(this.assets)) {
5471 if (Object.prototype.hasOwnProperty.call(this.assets, assetName)) {
5472 array.push({
5473 name: assetName,
5474 source: this.assets[assetName],
5475 info: this.assetsInfo.get(assetName) || EMPTY_ASSET_INFO
5476 });
5477 }
5478 }
5479 return array;
5480 }
5481
5482 /**
5483 * Returns the asset or undefined when not found.

Callers 9

runAsChildMethod · 0.80
emitFilesMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
webpack.config.jsFile · 0.80
compressionFunction · 0.80

Calls 4

keysMethod · 0.65
callMethod · 0.45
pushMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected