Re:Modern Node.js Patterns
by 8n4vidtmkvmk on Sunday August 03, 2025 @11:37PM
(#44781925)
It was a pain, but rollup can export both if you write the source in esm. The part I find most annoying is exporting the typescript types. There's no tree-shaking for that!
[ Parent
| on HN ]
Re:Modern Node.js Patterns
by franciscop on Monday August 04, 2025 @03:00AM
(#44782810)
For simple projects you needed now to add rollup or other build system that didn't have or need it before. For complex systems (with non-trivial exports), now you have a mess since it wouldn't work straight away.
Now with ESM if you write plain JS it works again. If you use Bun, it also works with TS straight away.