server/laf-cloud/tests/pass-check-loader.mjs

6 lines
320 B
JavaScript

import { registerHooks } from 'node:module';
registerHooks({ resolve(specifier, context, next) {
if (['@/passCheckService','@/passCheckConfig'].includes(specifier)) return { url: new URL('../functions/' + specifier.slice(2) + '.ts', import.meta.url).href, shortCircuit: true };
return next(specifier, context);
}});