tsdown

Bundle TypeScript and JavaScript libraries with Rolldown and generate type declarations.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/cooker/wx-mp-article --skill tsdown-cooker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/cooker/wx-mp-article/tree/main/.cursor/skills/tsdown
Command: npx skills add https://github.com/cooker/wx-mp-article --skill tsdown-cooker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of bundling TypeScript and JavaScript libraries, significantly reducing build times and simplifying complex build configurations.

Core Features & Use Cases

  • Fast Bundling: Leverages Rolldown for blazing-fast library bundling.
  • Type Declarations: Automatically generates .d.ts files.
  • Multi-Format Output: Supports ESM, CJS, IIFE, and UMD formats.
  • Plugin Ecosystem: Integrates with Rolldown, Rollup, and Unplugin plugins.
  • Use Case: Quickly set up a new npm package, configure its build process for multiple module formats, and ensure type safety for consumers.

Quick Start

Use the tsdown skill to bundle your TypeScript library with ESM and CJS 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 both ESM and CJS formats?

You can bundle a TypeScript library into ESM and CJS formats by using a high-performance build tool powered by Rolldown. This automatically configures multi-format output for broad package compatibility.

Can I automatically generate .d.ts type declarations when bundling JavaScript libraries?

Yes, you can automatically generate .d.ts type declarations during the JavaScript library bundling process. This ensures type safety for package consumers without requiring a separate type generation step.

Does tsdown support migrating an existing tsup build configuration?

Yes, tsdown supports migrating an existing tsup build configuration. It leverages Rolldown for high performance while maintaining compatibility with your current library build setup.

What is the best way to speed up TypeScript library build times?

The best way to speed up TypeScript library build times is to use a bundler powered by Rolldown. It significantly reduces build durations while handling complex library configurations and type declaration generation.

Can I use Rollup and Unplugin plugins with a Rolldown-based bundler?

Yes, you can use Rollup and Unplugin plugins with a Rolldown-based bundler. This library build tool integrates with the existing plugin ecosystem to extend functionality and customize your build process.

Does the bundler support outputting IIFE and UMD formats for JavaScript libraries?

Yes, the bundler supports outputting IIFE and UMD formats for JavaScript libraries. Alongside ESM and CJS, it provides multi-format output configurations to ensure your library works in various execution environments.