“Just” is doing a lot of heavy lifting here. It’s so frustrating watching people think it’s just because a bunch of smart and hard working people are either lazy or stubborn.
I'm completely clueless w.r.t js modules, but I'm wondering how did Bun manage to do it? Does it work well?
It works great for 90% of use cases, but getting that last 10% to work is really really hard so Bun (and node 22 which supports the same thing with an experimental) just throws an error in those cases. The most notable thing is `require`-ing an async ESM module from CJS, because require is a synchronous call you cant just async-ify it trivially.