tsdown

Installation
Summary

Fast TypeScript/JavaScript library bundler powered by Rolldown with multi-format output and type declaration generation.

  • Supports bundling to ESM, CJS, IIFE, and UMD formats with automatic peer dependency externalization and tree shaking
  • Generates TypeScript declaration files (.d.ts) with source map and compiler option control, plus experimental CSS pipeline with preprocessor and PostCSS support
  • Includes watch mode, minification, source maps, unbundle mode for preserving directory structure, and framework-specific recipes for React, Vue, Solid, and Svelte
  • Offers CLI commands, programmatic API, lifecycle hooks, workspace/monorepo support, and direct Rolldown option passthrough for advanced customization
  • Provides migration tooling from tsup and experimental features for standalone executable bundling and package validation (publint, attw)
SKILL.md

tsdown - The Elegant Library Bundler

Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc.

When to Use

  • Building TypeScript/JavaScript libraries for npm
  • Generating TypeScript declaration files (.d.ts)
  • Bundling for multiple formats (ESM, CJS, IIFE, UMD)
  • Optimizing bundles with tree shaking and minification
  • Migrating from tsup with minimal changes
  • Building React, Vue, Solid, or Svelte component libraries

Quick Start

# Install
pnpm add -D tsdown
Related skills
Installs
8.3K
Repository
antfu/skills
GitHub Stars
4.9K
First Seen
Jan 28, 2026