Is there a way to do this? I have a module that mocks ESM, but it only works if the module ends up getting loaded via import() rather than via require().
I'm dual-building so that the mocking module can be loaded using either require() or import(), but in either case, I need it to actually call import(specifier) and not Promise.resolve(specifier).then(s => require(s))