tsdown

Bundle TypeScript libraries into ESM outputs with generated .d.ts files.

5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/ShenQingchuan/val.dokduk --skill tsdown-shenqingchuan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/ShenQingchuan/val.dokduk/tree/main/.agents/skills/tsdown
Command: npx skills add https://github.com/ShenQingchuan/val.dokduk --skill tsdown-shenqingchuan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

tsdown addresses the complexity of building, type-declaration generation, and exporting TypeScript libraries in a fast, consistent manner.

Core Features & Use Cases

  • Bundling: Generate optimized ESM outputs for library distribution.
  • DTS Generation: Automatically create accurate .d.ts files.
  • Package Exports: Auto-generate main/module/exports fields for seamless publishing.

Quick Start

Install tsdown in your project and configure a simple build. Create a tsdown.config.ts with your entry points, enable dts and exports, and run the tsdown CLI to produce bundles, type declarations, and exports updates.

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 and automatically generate type declarations?

Bundling a TypeScript library involves generating optimized ESM outputs and automatically creating accurate .d.ts files. A config-driven workflow streamlines this by handling multiple entry points and auto-updating package.json exports for seamless publishing.

What is the best way to auto-generate package.json exports for a pure-ESM TypeScript project?

Auto-generating package.json exports for a pure-ESM project requires a build tool that maps multiple entry points to ESM outputs and automatically updates the main, module, and exports fields for seamless library publishing.

How do I configure multiple entry points for TypeScript library bundling?

Configuring multiple entry points for TypeScript bundling is done by defining them in a build configuration file. This config-driven workflow processes multiple entries simultaneously to generate corresponding ESM outputs and d.ts files.

Does Rolldown improve build speed for TypeScript library bundling?

Yes, TypeScript library bundling powered by Rolldown delivers fast builds. It accelerates the generation of optimized ESM outputs and automated type declarations, addressing the complexity and speed limitations of traditional bundling workflows.

Can I enforce pure-ESM builds when generating d.ts files for a TypeScript library?

Yes, you can enforce pure-ESM builds alongside automatic type declaration generation. The workflow targets pure-ESM outputs and automatically creates accurate .d.ts files, ensuring consistent and modern JavaScript library distribution.