egoist / tsup

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

optionalDependencies should be excluded by default #1099

Open IlyaSemenov opened 8 months ago

IlyaSemenov commented 8 months ago

By default tsup bundles all imported modules but dependencies and peerDependencies in package.json are always excluded.

I believe that optionalDependencies should be also excluded by default, as they are essentially the dependencies which are simply allowed to not exist, and the library author is supposed to import them dynamically and handle failed imports gracefully.

Upvote & Fund

Fund with Polar

ytkimirti commented 2 months ago

+1 on this. Spent a lot of time debugging it