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