1import { writeSync } from 'node:fs'; 2 3 4export async function resolve(specifier, context, next) { 5 if (specifier === 'node:fs' || specifier.includes('loader')) { 6 return next(specifier); 7 } 8 9 // Here for asserting dynamic import 10 await import('xxx/loader-resolve-passthru.mjs'); 11 12 writeSync(1, 'resolve dynamic import' + '\n'); // Signal that this specific hook ran 13 return next(specifier); 14} 15