tsdown
onmax/nuxt-skills
Rolldown + Oxc powered TypeScript bundler for npm packages with dual ESM/CJS output and .d.ts generation.
What is tsdown?
tsdown is a modern TypeScript bundler designed for building and publishing npm packages. Use it when you need to bundle TypeScript libraries with automatic declaration file generation, dual module format support, and package validation.
- Bundle TypeScript libraries with Rolldown + Oxc for fast builds
- Generate .d.ts type declaration files automatically
- Output dual ESM and CommonJS formats simultaneously
- Validate package exports and configuration
- Support Vue and React component libraries
- Watch mode for development iteration
How to install tsdown
npx skills add https://github.com/onmax/nuxt-skills --skill tsdown- Node.js and npm or compatible package manager
- TypeScript installed as a dev dependency
How to use tsdown
- 1.Install tsdown and TypeScript as dev dependencies: npm i -D tsdown typescript
- 2.Create a tsdown.config.ts file with entry point and output options
- 3.Configure format (esm/cjs), dts generation, and exports settings
- 4.Run tsdown to build or tsdown --watch for development mode
- 5.Reference config.md for CLI and entry point setup, output.md for format/target/validation, features.md for watch/framework integration, or advanced.md for plugins and programmatic API
Use cases
- Publishing a TypeScript utility library to npm with type definitions
- Building a Vue component library with dual module outputs
- Migrating from tsup to a faster Rolldown-based bundler
- Generating declaration files for a React component package
- Setting up a monorepo package with validated exports
- TypeScript library authors
- npm package maintainers
- Vue/React component library developers
- Teams migrating from tsup
tsdown FAQ
tsdown is a modern TypeScript bundler powered by Rolldown and Oxc, designed as a drop-in tsup replacement with faster builds and better performance.
Yes, tsdown can automatically generate .d.ts declaration files by setting dts: true in your configuration.
Yes, tsdown can generate dual ESM/CJS output formats simultaneously for maximum compatibility.
tsdown supports Vue and React component libraries, with additional framework integrations available through the features.md reference.
Refer to the advanced.md reference file which includes migration guidance from tsup to tsdown.
Full instructions (SKILL.md)
Source of truth, from onmax/nuxt-skills.
name: tsdown description: Use when bundling TypeScript libraries - provides tsdown configuration, dual ESM/CJS output, .d.ts generation, package validation, and plugin authoring license: MIT
tsdown
Rolldown + Oxc powered TypeScript bundler. Drop-in tsup replacement.
When to Use
- Building TypeScript libraries
- Generating .d.ts declarations
- Publishing npm packages
- Dual ESM/CJS output
- Vue/React component libraries
Quick Start
npm i -D tsdown typescript
// tsdown.config.ts
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: 'src/index.ts',
format: 'esm',
dts: true,
exports: true,
})
tsdown # Build
tsdown --watch # Watch mode
Reference Files
| Task | File |
|---|---|
| Config file, CLI, entry points | config.md |
| Format, target, dts, exports, validation | output.md |
| Shims, unbundle, watch, frameworks, WASM | features.md |
| Plugins, hooks, lint, programmatic, migration | advanced.md |
Loading Files
Consider loading these reference files based on your task:
- references/config.md - if setting up tsdown.config.ts, CLI, or entry points
- references/output.md - if configuring output format, target, .d.ts, exports, or validation
- references/features.md - if using shims, unbundle, watch mode, framework integrations, or WebAssembly
- references/advanced.md - if writing plugins, using linting/validation, programmatic API, or migrating from tsup
DO NOT load all files at once. Load only what's relevant to your current task.
Cross-Skill References
- Library patterns → Use
ts-libraryskill - Vue component libs → Use
vueskill - Package management → Use
pnpmskill
Related skills
More from onmax/nuxt-skills and the wider catalog.

vueuse
Essential Vue Composition utilities for common browser APIs and state management patterns.

document-writer
Writing guide for Nuxt documentation and blog posts with style standards, content patterns, and MDC component usage.

motion
Production-ready Vue 3/Nuxt animation library with gestures, scroll effects, and spring physics

nuxt-better-auth
Guides authentication in Nuxt apps using @nuxtjs/better-auth with client/server APIs, route protection, and session management.

claude-to-im
Bridge Claude Code/Codex to Telegram, Discord, Feishu, QQ, or WeChat for mobile chat access.

document-illustrator
>