MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / resolve

Function resolve

tests/loader.mjs:14–26  ·  view source on GitHub ↗
(specifier, ctx, nextResolve)

Source from the content-addressed store, hash-verified

12 * @type {import('node:module').ResolveHook}
13 */
14export async function resolve(specifier, ctx, nextResolve) {
15 const ext = extname(specifier);
16 if (ext === '.css' || ext === '.scss') {
17 // For CSS/SCSS, return the mock CSS module and skip default resolution.
18 return {
19 format: 'module',
20 url: css,
21 shortCircuit: true,
22 };
23 }
24
25 return nextResolve(specifier);
26}
27
28/**
29 *

Callers 10

generateTwoslashFsMapFunction · 0.85
generateBlogDataFunction · 0.85
explicitVersionFunction · 0.85
fetchChangelogFunction · 0.85
fetchChangelogBodyFunction · 0.85
fetchVersionPolicyFunction · 0.85
findAuthorLoginFunction · 0.85
renderPostFunction · 0.85
formatPostFunction · 0.85
writeToFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected