tsdown

Compile and bundle TypeScript libraries into ESM, CJS, IIFE, and UMD formats.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/hopkins385/sandbox-platform --skill tsdown-hopkins385
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/hopkins385/sandbox-platform/tree/main/.agents/skills/tsdown
Command: npx skills add https://github.com/hopkins385/sandbox-platform --skill tsdown-hopkins385

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the process of building, bundling, and deploying TypeScript and JavaScript libraries with high speed and customization.

Core Features & Use Cases

  • Multiple Format Support: Easily generate ESM, CJS, IIFE, UMD bundles.
  • Type Declaration Generation: Automate .d.ts creation for typed libraries.
  • CI/CD Integration: Simplify validation, validation checks, and publishing workflows.
  • Platform Compatibility: Target Node, browser, or platform-agnostic outputs.
  • Advanced Customization: Fine-grained control over dependencies, output, and build hooks.
  • Use Case: Quickly turn your TypeScript source into distributable NPM modules with source maps, minification, and optimized exports.

Quick Start

Run the build command for your library project specified in the config to generate multiple module formats, types, and ready-for-publish files.

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 module formats for NPM?

To bundle a TypeScript library, configure the build tool to generate ESM, CJS, IIFE, and UMD bundles. This automated compilation process outputs distributable NPM modules complete with source maps and type declarations.

How do I automate .d.ts type declaration generation for a TypeScript library?

Automating type declaration generation for a TypeScript library is handled during the build process. The bundler automatically creates .d.ts files alongside your compiled module outputs to provide typed library exports.

Can I integrate TypeScript library bundling into a continuous integration workflow?

You can integrate TypeScript library bundling into continuous integration workflows. The build process supports CI pipelines by automating compilation, running validation checks, and preparing ready-for-publish files.

Does this TypeScript bundler support platform-agnostic outputs for both Node and browsers?

The TypeScript bundler supports platform-agnostic outputs. You can configure the build to target Node, browser environments, or platform-agnostic outputs depending on your library's specific runtime requirements.

How do I configure build hooks and dependency control for a TypeScript library bundle?

Configuring build hooks and dependency control for a TypeScript library bundle is supported through advanced customization options. You gain fine-grained control over dependencies, output structures, and build lifecycle hooks.

What is the best way to optimize TypeScript library exports with minification and source maps?

The best way to optimize TypeScript library exports is using a fast, flexible bundler. It compiles source code into distributable NPM modules with automated minification, source maps, and multiple module format generation.