Hacker News new | ask | show | jobs
by tobyhinloopen 248 days ago
NodeJS with its commonjs vs modules, it's a huge mess IMO. Add typescript and build systems for bonus clusterf*cks.
2 comments

I’m trying to port a reasonable popular node module to ESM and it’s not going well. I’m finding bugs in createRequire() and meanwhile functional differences between require and import might make some idiomatic code patterns not function at all.
the whole commonjs vs modules is there precisely because they chose not to introduce a breaking change.

Typescript has introduced breaking changes but they're not that bad