MCPcopy
hub / github.com/webpack/webpack / getPathWithInfo

Method getPathWithInfo

lib/Compilation.js:5730–5738  ·  lib/Compilation.js::Compilation.getPathWithInfo

* Gets path with info. * @template {PathData} [T=PathData] * @param {string | import("./TemplatedPathPlugin").TemplatePathFn<T>} filename used to get asset path with hash * @param {T=} data context data * @returns {InterpolatedPathAndAssetInfo} interpolated path and asset info

(filename, data = /** @type {T} */ ({}))

Source from the content-addressed store, hash-verified

5728 * @returns {InterpolatedPathAndAssetInfo} interpolated path and asset info
5729 */
5730 getPathWithInfo(filename, data = /** @type {T} */ ({})) {
5731 if (!data.hash) {
5732 data = {
5733 hash: this.hash,
5734 ...data
5735 };
5736 }
5737 return this.getAssetPathWithInfo(filename, data);
5738 }
5739
5740 /**
5741 * Returns interpolated path.

Callers 5

createChunkAssetsMethod · 0.95
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 1

getAssetPathWithInfoMethod · 0.95

Tested by

no test coverage detected