nodejs/test/fixtures/es-module-loaders/loader-invalid-url.mjs

10 lines
311 B
JavaScript

/* eslint-disable node-core/required-modules */
export async function resolve(specifier, { parentURL }, defaultResolve) {
if (parentURL && specifier === '../fixtures/es-modules/test-esm-ok.mjs') {
return {
url: specifier
};
}
return defaultResolve(specifier, {parentURL}, defaultResolve);
}