MCPcopy
hub / github.com/webpack/webpack / getAssetPath

Method getAssetPath

lib/Compilation.js:5747–5753  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

5745 * @returns {string} interpolated path
5746 */
5747 getAssetPath(filename, data) {
5748 return this.hooks.assetPath.call(
5749 typeof filename === "function" ? filename(data) : filename,
5750 data,
5751 undefined
5752 );
5753 }
5754
5755 /**
5756 * Gets asset path with info.

Callers 4

getPathMethod · 0.95
constructorMethod · 0.80
getAssetPathWithInfoMethod · 0.80
webpack.config.jsFile · 0.80

Calls 1

callMethod · 0.45

Tested by

no test coverage detected