node/test/fixtures/es-module-loaders/missing-dynamic-instantiate...

18 lines
351 B
JavaScript

export function resolve(specifier, context, next) {
if (specifier === 'test') {
return {
url: 'file://'
};
}
return next(specifier);
}
export function getFormat(url, context, defaultGetFormat) {
if (url === 'file://') {
return {
format: 'dynamic'
}
}
return defaultGetFormat(url, context, defaultGetFormat);
}