tsdown

Bundle TypeScript and JavaScript libraries into multiple formats with Rolldown.

4|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/wong2/moltbook-ts --skill tsdown-wong2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/wong2/moltbook-ts/tree/main/.agents/skills/tsdown
Command: npx skills add https://github.com/wong2/moltbook-ts --skill tsdown-wong2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

tsdown streamlines bundling, type-declaration generation, and migration for TypeScript/JavaScript libraries, dramatically speeding up library releases and improving DX.

Core Features & Use Cases

  • Bundling libraries for multiple formats (ESM, CJS, IIFE, UMD) with tree-shaking and minification.
  • Generating TypeScript declaration files (.d.ts) and providing migration paths from tsup.
  • Ideal for building React, Vue, Solid, or Svelte component libraries and migrating from other tooling.

Quick Start

Install the tool, then invoke it via CLI or config:

  • Install
  • Basic usage
  • With a tsdown.config.ts
  • Enable watch mode
  • Migrate from tsup

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 CJS?

tsdown bundles TypeScript and JavaScript libraries for ESM, CJS, IIFE, and UMD formats with tree-shaking and minification. It uses a defineConfig-based configuration to specify entry points and target multiple output formats simultaneously.

Can I generate TypeScript declaration files when bundling npm packages?

Yes, generating TypeScript declaration files (.d.ts) is supported directly during the bundling process. You can enable this feature using the dts option within your defineConfig setup to output type definitions alongside your code.

What's the best way to migrate from tsup to another bundling tool with minimal changes?

Migrating from tsup requires minimal configuration changes when adopting tsdown, which provides a dedicated migration path. Simply transition your existing setup to a tsdown.config.ts file to continue bundling libraries seamlessly.

Does this bundling tool support React, Vue, Solid, or Svelte component libraries?

Yes, the tool is ideal for building React, Vue, Solid, and Svelte component libraries. It streamlines the bundling and type-declaration generation required for releasing framework-specific npm packages.

Why use a Rolldown-powered bundler for JavaScript library releases?

Using a Rolldown-powered bundler dramatically speeds up JavaScript library releases and improves developer experience. It delivers blazing-fast bundling speeds for TypeScript and JavaScript libraries while streamlining type generation.