egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.49k stars 209 forks source link

Support ES Module wrapper #1008

Open clayrisser opened 9 months ago

clayrisser commented 9 months ago

It would be nice if tsup had an option to automatically create an esm wrapper around the cjs module instead of compiling the esm module.

https://nodejs.org/api/packages.html#approach-1-use-an-es-module-wrapper

This would prevent the Dual CommonJS/ES module packages bug.

https://nodejs.org/api/packages.html#dual-commonjses-module-packages

@egoist any thoughts???

Upvote & Fund

Fund with Polar