tsdown

Bundle TypeScript/JavaScript libraries into ESM, CJS, IIFE, and UMD formats.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/ehyland/skills --skill tsdown
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/ehyland/skills/tree/main/skills/tsdown
Command: npx skills add https://github.com/ehyland/skills --skill tsdown

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

tsdown simplifies and speeds up bundling for TypeScript/JavaScript libraries by providing a Rolldown-powered workflow that handles multi-format outputs, automated declarations, and monorepo support in a single config.

Core Features & Use Cases

  • Multi-format Bundling: produce ESM, CJS, IIFE, and UMD outputs from library sources.
  • Type Declarations: auto-generate .d.ts files for TypeScript libraries.
  • Workspace/Monorepo Support: build multiple packages with a single config pattern.
  • Migration & Compatibility: facilitates migration from tsup and integrates with existing tooling.

Quick Start

To get started, install tsdown and create a tsdown.config.ts exporting defineConfig with your entry and formats.

Frequently Asked Questions about tsdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bundle TypeScript libraries for multiple formats like ESM and CommonJS?▼

Bundling TypeScript libraries for multiple formats involves using a build tool that handles ESM, CJS, IIFE, and UMD outputs from a single source. tsdown automates this multi-format bundling via Rolldown with a simple config, letting you specify entry points and desired output formats without manual format conversion.

Can I automatically generate .d.ts type declaration files when bundling?▼

Type declarations can be auto-generated during bundling by configuring DTS output in your build setup. tsdown includes built-in DTS generation, so TypeScript libraries produce `.d.ts` files alongside bundled outputs automatically through the defineConfig API.

What's the fastest way to bundle libraries with Rolldown?▼

Rolldown is a fast Rust-based bundler optimized for speed. tsdown wraps Rolldown with pre-configured bundling workflows for libraries, eliminating setup complexity and delivering faster build times compared to traditional JavaScript bundlers.

How do I build multiple packages in a monorepo with one bundler config?▼

Monorepo and workspace bundling requires a tool supporting multiple entry points and shared config patterns. tsdown provides workspace-level configuration that builds multiple packages using a single defineConfig pattern, simplifying monorepo library workflows.

Can I migrate from tsup to a faster bundler?▼

tsdown is designed for easy migration from tsup, offering compatible configuration patterns while leveraging Rolldown's performance improvements. It maintains API familiarity while delivering faster builds for TypeScript library bundling.

Do I need plugin support for custom bundling behavior?▼

Plugin hooks enable custom build logic beyond standard bundling. tsdown's defineConfig API exposes plugin hooks for extending bundling behavior, letting you integrate custom transformations and workflows into the build process.