1let thePort = null;
2
3export async function initialize(port) {
4  port.postMessage('initialize');
5  thePort = port;
6}
7
8export async function resolve(specifier, context, next) {
9  if (specifier === 'node:fs' || specifier.includes('loader')) {
10    return next(specifier);
11  }
12
13  thePort.postMessage(`resolve ${specifier}`);
14
15  return next(specifier);
16}
17