MCPcopy
hub / github.com/webpack/webpack / contextifySourceUrl

Function contextifySourceUrl

lib/NormalModule.js:639–646  ·  view source on GitHub ↗
(context, source, associatedObjectForCache)

Source from the content-addressed store, hash-verified

637 * @returns {string} new source path
638 */
639const contextifySourceUrl = (context, source, associatedObjectForCache) => {
640 if (source.startsWith("webpack://")) return source;
641 return `webpack://${makePathsRelative(
642 context,
643 source,
644 associatedObjectForCache
645 )}`;
646};
647
648/**
649 * @param {string} context absolute context path

Callers 3

contextifySourceMapFunction · 0.85
createSourceForAssetMethod · 0.85
createSourceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected