1import { writeSync } from 'node:fs'; 2 3export async function load(url, context, next) { 4 // This check is needed to make sure that we don't prevent the 5 // resolution from follow-up loaders. It wouldn't be a problem 6 // in real life because loaders aren't supposed to break the 7 // resolution, but the ones used in our tests do, for convenience. 8 if (url === 'node:fs' || url.includes('loader')) { 9 return next(url); 10 } 11 12 writeSync(1, 'load passthru' + '\n'); // Signal that this specific hook ran 13 return next(url); 14} 15