tsdown
Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.
npx skills add antfu/skills --skill tsdown --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# tsdown - The Elegant Library Bundler Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc. ## Runtime Requirement `tsdown` requires **Node.js 22.18.0 or higher to run** (build-time only). However, the bundled output can target much lower Node.js versions via the [`target`](references/option-target.md) option, so libraries built with tsdown are **not locked to Node.js 22+ at runtime**. If your package needs to support Node.js 18 / 20: - **Build with Node.js 22+ in CI** (e.g. set `target: 'node18'` or `target: 'node20'`). - **Test the built output (or the packed tarball) on the lower Node.js versions** you intend to support — e.g. using a matrix job that runs the published package's tests on Node.js 18 / 20 / 22. ## 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 ```bash # Install pnpm add -D tsdown # Basic usage npx tsdown # With config file npx tsdown --config
- Runtime Requirement
- When to Use
- Quick Start
- Basic Configuration
- Core References
- Build Options
- Dependency Handling
- Output Enhancement
- Framework & Runtime Support
- Common Patterns
- Basic Library Bundle
- Multiple Entry Points
- Browser Library (IIFE/UMD)
- React Component Library
Install pnpm add -D tsdown Basic usage npx tsdown With config file npx tsdown --config tsdown.config.ts Watch mode npx tsdown --watch Migrate from tsup npx tsdown-migrate
What does the tsdown skill do?
Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.
How do I install it?
Run `npx skills add antfu/skills --skill tsdown --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From antfu/skills, a repository with 5,709 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
