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

Tree-shaking documentation isn't clear enough. #1136

Open wujekbogdan opened 4 weeks ago

wujekbogdan commented 4 weeks ago

The docs say that tree-shaking is enabled by default. It also says that setting it to true makes tsup use Rollup, rather than ESBuild, for tree-shaking. What's missing from the docs is:


I wonder if this is an issue with the docs or rather an issue with the API.

How about adding a new config property treeshakeType:

type TreeshakeType = 'rollup' | 'esbuild'

Then the current treeshake property would either accept a boolean (if treeshakeType : 'esbuild') or TreeshakingOptions (if treeshakeType: 'rollup')

Upvote & Fund

Fund with Polar