Hacker News new | ask | show | jobs
by seniorsassycat 710 days ago
The article suggests that you ship typescript so the app would compile down to esm or cjs.

Node 22 has an experimental flag that supports requiring esm as long as there's no top-level await

1 comments

Author here. I should've worded that better in the article. The takeaway should not be to publish only TS sources to npm. The whole npm ecosystem is based around the assumption that you ship .js files and doing anything else would break it. I've updated the wording to hopefully make it less confusing.