tsdown
Fast TypeScript/JavaScript library bundler powered by Rolldown with multi-format output and type declaration generation.
- Supports four output formats (ESM, CJS, IIFE, UMD) with automatic dependency externalization and tree shaking
- Generates TypeScript declaration files (.d.ts) with source maps, Vue SFC support, and custom compiler options
- Includes watch mode, source maps, minification, package validation (publint/attw), and CI-aware configuration
- Handles React, Vue, Solid, and Svelte component libraries with framework-specific optimizations and WASM support
- Offers unbundle mode to preserve directory structure, executable bundling (SEA), and direct migration from tsup via
tsdown-migrate
tsdown - The Elegant Library Bundler
Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc.
When to Use
- Building TypeScript/JavaScript libraries for npm
- Generating TypeScript declaration files (.d.ts)
- Bundling for multiple formats (ESM, CJS, IIFE, UMD)
- Optimizing bundles with tree shaking and minification
- Migrating from tsup with minimal changes
- Building React, Vue, Solid, or Svelte component libraries
Quick Start
# Install
pnpm add -D tsdown
More from hairyf/skills
tailwindcss
Tailwind CSS utility-first CSS framework. Use when styling web applications with utility classes, building responsive designs, or customizing design systems with theme variables.
1.7Khairy-utils
Comprehensive skills for working with @hairy/utils core utilities
891motion
Motion animation library for JavaScript, React and Vue. Use when creating animations, gestures, layout transitions, scroll-linked effects, or working with motion values and animation controls.
763next
Next.js framework for building React applications with App Router, Server Components, and optimized performance. Use when working with Next.js apps, routing, data fetching, caching, Server Actions, or building full-stack React applications.
714react-use
Collection of essential React Hooks for sensors, UI, animations, side-effects, lifecycles, and state management
692valtio
Valtio proxy state management for React and vanilla JavaScript. Use when creating reactive state, managing application state, or working with proxy-based state management.
636