tsdown

Automates TypeScript/JavaScript library bundling with Rolldown and generates .d.ts files.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/LinWhite2333/ai-configuration --skill tsdown-linwhite2333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/LinWhite2333/ai-configuration/tree/main/skills/skills/tsdown
Command: npx skills add https://github.com/LinWhite2333/ai-configuration --skill tsdown-linwhite2333

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tsdown, rolldown-plugin-dts, rollup-plugin-node-resolve, rollup-plugin-commonjs, rollup-plugin-json, rollup-plugin-replace, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of building TypeScript and JavaScript libraries, providing fast and efficient bundling with various features like type declarations, minification, and support for multiple formats.

Core Features & Use Cases

  • Fast Bundling: Leverages Rolldown for blazing-fast library builds.
  • Type Declarations: Automatically generates .d.ts files for type-safe libraries.
  • Minification: Optimizes bundle size with tree shaking and minification.
  • Multiple Formats: Supports esm, cjs, iife, umd for different use cases.
  • Use Case: When building a library that needs to support multiple environments like npm packages, browsers, and Node.js, tsdown can handle the bundling efficiently.

Quick Start

Install tsdown as a dev dependency and run it with the npx tsdown command to bundle your TypeScript/JavaScript 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 for multiple formats like esm and cjs?

To bundle a TypeScript library for multiple formats like esm and cjs, you can use tsdown. It automates bundling TypeScript and JavaScript libraries, supporting esm, cjs, iife, and umd formats for different environments.

What is the fastest way to build JavaScript libraries with type declarations?

The fastest way to build JavaScript libraries with type declarations is using Rolldown. tsdown leverages Rolldown for blazing-fast builds while automatically generating .d.ts files for type-safe libraries.

Does tsdown support minification and tree shaking for npm packages?

Yes, tsdown supports minification and tree shaking for npm packages. It optimizes bundle size through tree shaking and minification when building your TypeScript or JavaScript library.

Can I use Rolldown plugins like rollup-plugin-node-resolve with this build automation tool?

Yes, you can use Rolldown plugins with this build automation tool. tsdown requires tsdown and related plugins like rollup-plugin-node-resolve, rollup-plugin-commonjs, and rolldown-plugin-dts for full functionality.

How do I start automating TypeScript library builds with tsdown?

To start automating TypeScript library builds, install tsdown as a dev dependency and run the `npx tsdown` command. This will bundle your TypeScript or JavaScript library efficiently.

Why should I choose Rolldown over other bundlers for JavaScript library bundling?

You should choose Rolldown for JavaScript library bundling to achieve blazing-fast build speeds. tsdown leverages Rolldown to provide efficient bundling, type declaration generation, and minification for multiple output formats.