tsdown

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Bundling TypeScript and JavaScript libraries for distribution used to be slow and error-prone; tsdown provides a blazing-fast, configurable bundling workflow powered by Rolldown to streamline multi-format outputs and declarations.

Core Features & Use Cases

  • Accelerates library builds with multi-format outputs (esm, cjs, iife, umd) and automatic type declaration generation.
  • Supports monorepos, workspace patterns, and plugin integration for extended workflows.
  • Facilitates migration from tsup with migration guides and compatibility notes, while preserving project structure.

Quick Start

Create a tsdown config and run a single command to generate outputs for multiple formats.

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 multiple formats like ESM and CJS by using tsdown, which automates multi-format outputs including IIFE and UMD via Rolldown. It streamlines the build process by generating bundles and type declarations from a single configuration.

What is the best way to migrate a TypeScript library from tsup to another bundler?

Migrating a TypeScript library from tsup involves using tsdown, which provides migration guides and compatibility notes. It preserves your project structure while transitioning your build workflow to Rolldown for faster bundling speeds.

Does tsdown support monorepo and workspace patterns for JavaScript libraries?

Yes, tsdown supports monorepo and workspace patterns for JavaScript libraries. It handles workspace configurations natively, allowing you to manage complex project structures and bundle multiple packages within a single build workflow.

How do I generate type declarations when bundling a TypeScript library?

To generate type declarations when bundling a TypeScript library, tsdown automates the process alongside multi-format outputs. By configuring your build with defineConfig, it produces the necessary declaration files during the Rolldown bundling step.

Can I integrate custom plugins into the Rolldown bundling workflow?

Yes, you can integrate custom plugins into the Rolldown bundling workflow. tsdown supports plugin integration to extend workflows, allowing you to customize the build process for external dependencies and specific output requirements.

Why use Rolldown for bundling JavaScript libraries instead of other build tools?

Using Rolldown for bundling JavaScript libraries provides blazing-fast build speeds compared to other tools. tsdown leverages Rolldown to accelerate library builds, offering a highly configurable workflow that produces optimized ESM, CJS, IIFE, and UMD bundles.