MCPcopy
hub / github.com/webpack/webpack / getSourceFileName

Method getSourceFileName

lib/asset/AssetGenerator.js:242–249  ·  view source on GitHub ↗

* Gets source file name. * @param {NormalModule} module module * @param {RuntimeTemplate} runtimeTemplate runtime template * @returns {string} source file name

(module, runtimeTemplate)

Source from the content-addressed store, hash-verified

240 * @returns {string} source file name
241 */
242 static getSourceFileName(module, runtimeTemplate) {
243 return makePathsRelative(
244 runtimeTemplate.compilation.compiler.context,
245 /** @type {string} */
246 (module.getResource()),
247 runtimeTemplate.compilation.compiler.root
248 ).replace(/^\.\//, "");
249 }
250
251 /**
252 * Gets full content hash.

Callers 3

getFilenameWithInfoMethod · 0.80
getAssetPathWithInfoMethod · 0.80
updateHashMethod · 0.80

Calls 2

getResourceMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected