mirror of https://github.com/nodejs/node.git
11 lines
331 B
JavaScript
11 lines
331 B
JavaScript
import { writeSync } from 'node:fs';
|
|
import { inspect } from 'node:util';
|
|
|
|
export async function resolve(specifier, context, nextResolve) {
|
|
if (specifier.startsWith('node:')) {
|
|
return nextResolve(specifier);
|
|
}
|
|
writeSync(1, `loader-a ${inspect({specifier})}\n`);
|
|
return nextResolve(specifier.replace(/^xxx\//, `./`));
|
|
}
|