Hacker News new | ask | show | jobs
by jeswin 772 days ago
IMO, it's the best thing to happen to Node. It (kinda) unifies browser and server syntax, and across competing server-side JS frameworks (Node, Deno, Bun). CommonJS was clearly a NodeJS thing.

We embraced ESM a couple of years back. It was a bit harder earlier on; for example our test frameworks didn't support mocking ESM code well enough. But now there's hardly anything to complain about. There's no going back really - we wouldn't want to.

1 comments

>IMO, it's the best thing to happen to Node. It (kinda) unifies browser and server syntax, and across competing server-side JS frameworks (Node, Deno, Bun). CommonJS was clearly a NodeJS thing.

what the fuck was the point of unifying this particular thing at such a great PITA cost, when obviously none of node APIs work in the browser?

should things like Buffer be removed too? the browser only has Uint8Array, after all.