Node can require() an ES module now, and it refuses two things. We could not refuse either
Recent Node versions will let you require() an ES module. It is a genuinely
hard thing to have shipped, and it comes with two documented refusals:
ERR_REQUIRE_ASYNC_MODULE if anything in the required graph uses top-level
await, and ERR_REQUIRE_CYCLE_MODULE if the graph has a cycle that crosses the
CommonJS boundary.
Node can refuse, because import() is always sitting there as an escape hatch.
Tell the user to await it and the problem is theirs.
In a browser worker there is no escape hatch. require() is
synchronous all the way down because the filesystem
under it is, and a project's entry point is required by a loader that cannot
return a promise to anyone. Every import becomes CommonJS at load time or the
program does not start. Refusing was not on the menu.