tsdown
Library publishing with tsdown
Building + publishing library packages with tsdown.
MUST
- Build/publish packages with
tsdown. Why: standard ecosystem build. - Emit ESM + declaration files. Why: consumers need types.
prepublishOnlybuilds before publish. Why: never ship staledist/.- Export every type used in the public API. Why: DTS generation fails on unexported internal types leaking through re-exports.
NEVER
- Bundle deps consumers should install themselves. Cost: duplicate/version-conflict in consumer tree.