tsdown

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Bundles TypeScript and JavaScript libraries quickly and efficiently using Rolldown to produce multi-format bundles (ESM, CJS, IIFE, and UMD) along with type declarations, while supporting migration from tsup and library-focused workflows.

Core Features & Use Cases

  • Multi-format bundling (esm, cjs, iife, umd) with optional DTS generation.
  • Migration guidance from tsup and comprehensive documentation for library authors.
  • Workspace/monorepo support and plugin integrations for React, Vue, and WASM frameworks.

Quick Start

Create a tsdown config with defineConfig and run the tsdown CLI to build your library.

Frequently Asked Questions about tsdown

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

FAQPage Schema
How do I bundle a TypeScript library into multiple formats like ESM and CJS?

You can bundle a TypeScript library into ESM, CJS, IIFE, and UMD formats by configuring entry, format, and outDir settings. This process uses Rolldown to deliver multi-format bundles and optional TypeScript declarations.

What is the best way to migrate a tsup configuration to another bundler?

The best way to migrate tsup configurations is using the built-in migration guidance. You transition existing build settings to a new Rolldown-powered configuration, achieving faster multi-format bundling speeds for your JavaScript library workflows.

Does this bundler support workspace and monorepo setups for JavaScript libraries?

Yes, this JavaScript library bundler supports workspace and monorepo setups. It handles multi-package builds within a single repository and integrates React, Vue, and WASM framework plugins while delivering ESM and CJS outputs.

How do I generate TypeScript declarations when building a JavaScript library?

You generate TypeScript declarations when building a JavaScript library by enabling the dts configuration option. This produces .d.ts files alongside your ESM, CJS, IIFE, and UMD bundles during the Rolldown build process.

Can I use Rolldown to treeshake unused code in TypeScript library bundles?

Yes, you can use Rolldown to treeshake unused code in TypeScript library bundles. By enabling the treeshake configuration setting, you eliminate dead code and reduce the final output size across your ESM, CJS, and UMD builds.

Why choose a Rolldown-based build tool over other TypeScript library bundlers?

You choose a Rolldown-based build tool over other TypeScript library bundlers to achieve blazing-fast build speeds. It delivers multi-format outputs, workspace support, and seamless migration from tsup for efficient library development.