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

11 lines
283 B
JavaScript

export async function resolve(specifier, { parentURL, importAttributes }, next) {
if (parentURL && specifier === '../fixtures/es-modules/test-esm-ok.mjs') {
return {
shortCircuit: true,
url: specifier,
importAttributes,
};
}
return next(specifier);
}