pm4ai

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.
  • prepublishOnly builds before publish. Why: never ship stale dist/.
  • 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.

On this page