tsdown

Automate multi-format builds and DTS generation for TypeScript libraries.

302|22|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/JetBrains/skills --skill tsdown-jetbrains
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/JetBrains/skills/tree/main/tsdown
Command: npx skills add https://github.com/JetBrains/skills --skill tsdown-jetbrains

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

tsdown simplifies the process of bundling and distributing TypeScript/JavaScript libraries by automating multi-format builds, DTS generation, and workspace support.

Core Features & Use Cases

  • Supports multiple formats (esm, cjs, iife, umd), DTS generation, and automatic exports for library packages.
  • Handles monorepos and workspaces, with config file or CLI for flexible builds across packages.
  • Includes a plugin system and dependency management to externalize or inline dependencies as needed.

Quick Start

Install tsdown as a dev dependency and run the tsdown CLI to start bundling your 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 into multiple formats like ESM and CJS?

To bundle a TypeScript library into multiple formats, you can use a build tool that automates multi-format output like ESM, CJS, IIFE, and UMD. This approach also handles DTS generation and validates package exports for distribution.

What is the best way to generate type declarations for a JavaScript library build?

Generating type declarations for a JavaScript library build is best handled by an automated bundling tool that integrates DTS generation directly into the workflow. This ensures your package exports accurate TypeScript definitions alongside the compiled code.

Can I configure library builds across a monorepo workspace using a single tool?

Yes, you can configure library builds across a monorepo workspace using an automated bundling tool that supports workspace environments. It allows flexible configuration across packages via a config file or CLI to manage entry points and outputs.

Does this bundling approach support externalizing dependencies for library packages?

Yes, this bundling approach supports externalizing dependencies for library packages through its built-in dependency management and plugin system. You can configure the build to either externalize or inline dependencies as needed for your specific package requirements.

How do I start building and packaging a TypeScript library using a CLI?

To start building and packaging a TypeScript library using a CLI, install the bundler as a dev dependency and run its command line interface. This automates tasks like multi-format bundling, cleaning, and plugin integration without complex manual setup.

Why should I use an automated library build tool instead of manual TypeScript compilation?

You should use an automated library build tool instead of manual TypeScript compilation to achieve blazing fast multi-format bundling, automatic exports validation, and seamless DTS generation. It eliminates repetitive configuration tasks for library authors.