MCPcopy
hub / github.com/webpack/webpack / getAbsolutePath

Function getAbsolutePath

lib/util/extractSourceMap.js:77–87  ·  view source on GitHub ↗

* Get absolute path for source file * @param {string} context context directory * @param {string} request file request * @param {string} sourceRoot source root directory * @returns {string} absolute path

(context, request, sourceRoot)

Source from the content-addressed store, hash-verified

75 * @returns {string} absolute path
76 */
77function getAbsolutePath(context, request, sourceRoot) {
78 if (sourceRoot) {
79 if (isAbsolute(sourceRoot)) {
80 return join(undefined, sourceRoot, request);
81 }
82
83 return join(undefined, join(undefined, context, sourceRoot), request);
84 }
85
86 return join(undefined, context, request);
87}
88
89/**
90 * Check if value is a URL

Callers 1

fetchFromURLFunction · 0.85

Calls 2

isAbsoluteFunction · 0.85
joinFunction · 0.85

Tested by

no test coverage detected