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:
treeshake
is set to false
? Does it disable tree-shaking entirely, or is it an equivalent of treeshake: undefined
, which effectively turns it on but uses ESBuild rather than Rollup?treeshake
to true
make the build process use Rollup for the entire build, or is Rollup somehow used for tree-shaking only?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'
)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too