About tsdown
tsdown is a TypeScript bundler powered by Rolldown and Oxc, and a drop-in replacement for tsup. This skill guides developers building TypeScript libraries and npm packages through configuration, output formats, and advanced features.
Key features
- 01Bundle TypeScript projects
- 02Generate .d.ts declarations
- 03Produce ESM and CJS output
- 04Run in watch mode
- 05Consult configuration and migration guides
Use cases
- 01Build and publish a TypeScript library
- 02Generate type declarations for an npm package
- 03Configure bundling for Vue or React component libraries
- 04Migrate build configuration from tsup
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ onmax/ nuxt-skills --skill tsdownAfter installing, type/tsdownin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/advanced.mdconfig.mdfeatures.mdoutput.mdDetails
From the project READMEtsdown
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
Comments
Markdown supported