PR-URL: https://github.com/nodejs/node/pull/43784 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
17 lines
351 B
JavaScript
17 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);
|
|
}
|