MCPcopy
hub / github.com/webpack/webpack / getPath

Method getPath

lib/Compilation.js:5713–5721  ·  lib/Compilation.js::Compilation.getPath

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

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

Source from the content-addressed store, hash-verified

5711 * @returns {string} interpolated path
5712 */
5713 getPath(filename, data = /** @type {T} */ ({})) {
5714 if (!data.hash) {
5715 data = {
5716 hash: this.hash,
5717 ...data
5718 };
5719 }
5720 return this.getAssetPath(filename, data);
5721 }
5722
5723 /**
5724 * Gets path with info.

Callers 15

createModuleAssetsMethod · 0.95
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
emitAssetsMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
_getResolvedFullNameMethod · 0.80
replaceKeysMethod · 0.80
renderMethod · 0.80
chunkHashMethod · 0.80

Calls 1

getAssetPathMethod · 0.95

Tested by

no test coverage detected