egoist / tsup

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

optionalDependencies should be excluded by default #1099

Open IlyaSemenov opened 3 months ago

IlyaSemenov commented 3 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