tsdown

Bundle TypeScript and JavaScript libraries with Rolldown and Oxc.

33|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/wra-bradshaw/typst-wasm --skill tsdown-wra-bradshaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/wra-bradshaw/typst-wasm/tree/main/.agents/skills/tsdown
Command: npx skills add https://github.com/wra-bradshaw/typst-wasm --skill tsdown-wra-bradshaw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of bundling TypeScript and JavaScript libraries, offering a fast and efficient solution for creating distributable packages.

Core Features & Use Cases

  • Library Bundling: Create optimized bundles for various formats (ESM, CJS, IIFE, UMD).
  • Type Declarations: Automatically generate .d.ts files for TypeScript projects.
  • Use Case: When developing a reusable UI component library for React, use this Skill to bundle your TypeScript code into both ESM and CJS formats, generate type definitions, and ensure compatibility across different project setups.

Quick Start

Use the tsdown skill to bundle your project's entry point located at 'src/index.ts'.

Frequently Asked Questions about tsdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bundle TypeScript libraries into multiple output formats?

You can bundle TypeScript libraries into multiple output formats like ESM, CJS, IIFE, and UMD using tsdown, which leverages Rolldown and Oxc for high-performance module bundling and optimized distributable package creation.

How do I generate .d.ts type declarations when bundling JavaScript libraries?

Generating .d.ts type declarations during JavaScript library bundling is supported automatically by tsdown, ensuring your TypeScript projects produce accurate type definitions alongside their optimized bundles for downstream consumption.

What is the best way to optimize React component library bundling for npm?

The best way to optimize React component library bundling for npm is using tsdown to bundle TypeScript code into ESM and CJS formats while generating type definitions, ensuring compatibility across different project setups.

Does Rolldown support advanced configurations for JavaScript module bundling?

Rolldown supports advanced configurations for JavaScript module bundling through tsdown, allowing developers to specify entry points like src/index.ts and manage robust, high-performance builds for modern npm package distribution.

Why use Rolldown and Oxc for TypeScript library bundling instead of other tools?

Rolldown and Oxc are used for TypeScript library bundling to achieve high performance and efficient module processing, streamlining the creation of distributable packages faster than standard JavaScript bundling tools.