tsdown

Bundle TypeScript and JavaScript libraries into ESM, CJS, IIFE, and UMD formats.

2|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/wilfriedago/dotfiles --skill tsdown-wilfriedago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/wilfriedago/dotfiles/tree/main/agents/skills/tsdown
Command: npx skills add https://github.com/wilfriedago/dotfiles --skill tsdown-wilfriedago

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, offering unparalleled speed and flexibility for library development.

Core Features & Use Cases

  • Fast Bundling: Leverages Rolldown and Oxc for extremely fast build times.
  • Library Focus: Optimized for building libraries for npm, generating type declarations, and supporting multiple output formats (ESM, CJS, etc.).
  • Use Case: You're developing a new React component library for your company. Use this Skill to bundle your TSX code into both ESM and CJS formats, generate .d.ts files for type safety, and ensure optimal performance.

Quick Start

Run npx tsdown to bundle your project using the default configuration.

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?

To bundle a TypeScript library into multiple formats, use tsdown to compile your code into ESM, CJS, IIFE, and UMD outputs while automatically generating .d.ts type declaration files for npm distribution.

What is the fastest build tool for JavaScript and TypeScript library development?

tsdown is a fast build tool for JavaScript and TypeScript library development that leverages Rolldown and Oxc to achieve extremely high performance and rapid build times during compilation.

Does this bundling tool work with React, Vue, and Solid components?

Yes, this TypeScript and JavaScript bundling tool works with React, Vue, and Solid, allowing you to seamlessly compile framework component libraries into optimized ESM and CJS bundles.

Can I use a programmatic API and plugins for custom build pipelines?

Yes, you can use a programmatic API, hooks, and plugins to construct custom build pipelines, enabling you to fully automate and tailor the TypeScript and JavaScript bundling process to your specific workflow.

How do I generate .d.ts type declarations when building an npm package?

To generate .d.ts type declarations when building an npm package, you can bundle your TypeScript library with tsdown, which natively supports type declaration generation alongside multi-format outputs.