tsdown
tsdown fast TypeScript library bundler powered by Rolldown and Oxc. Use when bundling TypeScript libraries, configuring entry points, or generating .d.ts declaration files.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
tsdown is a next-generation TypeScript library bundler built on Rolldown and Oxc. It provides blazing-fast builds, automatic .d.ts generation, and seamless migration from tsup. Supports Rolldown/Rollup/Unplugin plugins and features smart dependency handling.
The skill is based on tsdown v0.20.1, generated at 2026-01-28.
Anthony's Preferences:
- Build pure-ESM packages, avoid CJS
- Always enable
dtsoption for type declarations - Enable
exportsoption for auto-generated package exports
Core
| Topic | Description | Reference |
|---|---|---|
| Configuration | Config file setup, defineConfig, multiple configs | core-config |
| CLI | Command-line interface and options | core-cli |
| Entry Points | Entry files, aliases, glob patterns | core-entry |
Build Options
| Topic | Description | Reference |
|---|---|---|
| Output | Format (ESM/CJS/IIFE/UMD), directory, target, platform | options-output |
| Declaration Files | .d.ts generation, isolatedDeclarations, sourcemaps | options-dts |
| Dependencies | External, noExternal, dependency bundling | options-dependencies |
| Package Exports | Auto-generating exports, main, module fields | options-package-exports |
Features
| Topic | Description | Reference |
|---|---|---|
| Optimization | Tree shaking, minification, sourcemaps | features-optimization |
| Shims | CJS/ESM compatibility shims | features-shims |
| Unbundle Mode | Bundleless transpile-only builds | features-unbundle |
| Watch Mode | Auto-rebuild on file changes | features-watch |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Plugins | Rolldown, Unplugin, Rollup, Vite plugins | advanced-plugins |
| Hooks | Build lifecycle hooks | advanced-hooks |
| Programmatic API | Using tsdown from code | advanced-programmatic |
| Rolldown Options | Customizing inputOptions and outputOptions | advanced-rolldown-options |
Recipes
| Topic | Description | Reference |
|---|---|---|
| Framework Support | Vue and React library bundling | recipes-frameworks |
| Migration | Migrating from tsup | recipes-migration |
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!