MCPcopy Create free account
hub / github.com/webpack/less-loader / normalizeImportSpecifier

Function normalizeImportSpecifier

src/utils.js:398–408  ·  view source on GitHub ↗

* @param {string} specifier specifier * @returns {string} resolved specifier

(specifier)

Source from the content-addressed store, hash-verified

396 * @returns {string} resolved specifier
397 */
398function normalizeImportSpecifier(specifier) {
399 if (specifier.startsWith("file:")) {
400 return specifier;
401 }
402
403 if (path.isAbsolute(specifier)) {
404 return url.pathToFileURL(specifier).href;
405 }
406
407 return specifier;
408}
409
410/**
411 * @param {LoaderContext} loaderContext loader context

Callers 1

getLessImplementationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…