tsdown-migrate
This skill guides you through converting an existing tsup-based build setup to tsdown, Rolldown's elegant library bundler. It provides comprehensive option mappings and automated config transformation to ensure your project transitions smoothly while maintaining build performance and output quality.
tsdown-migrate guides you through converting your tsup-based build setup to tsdown, Rolldown's elegant library bundler. The migration process involves three key steps: first, update your package.json to replace tsup with tsdown as a dependency; second, transform your tsup configuration file using tsdown-migrate's option mappings to ensure all settings are correctly translated; and third, update your build scripts to use tsdown commands. The skill provides comprehensive option mappings to ensure your project transitions smoothly while maintaining build performance and output quality.
AI-generated summary based on this skill's SKILL.md
Install
rolldown/tsdown/tsdown-migrate · repository language: TypeScript
git clone https://github.com/rolldown/tsdown
cp -r tsdown/skills/tsdown-migrate ~/.claude/skills/tsdown-migrateFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I migrate from tsup to tsdown?
tsdown-migrate guides you through converting your tsup-based build setup to tsdown, Rolldown's elegant library bundler. The migration process involves three key steps: first, update your package.json to replace tsup with tsdown as a dependency; second, transform your tsup configuration file using tsdown-migrate's option mappings to ensure all settings are correctly translated; and third, update your build scripts to use tsdown commands. The skill provides comprehensive option mappings to ensure your project transitions smoothly while maintaining build performance and output quality.
What are the main differences between tsup and tsdown options and defaults?
tsdown-migrate helps you understand the key differences between tsup and tsdown options and defaults. While both are TypeScript bundlers, tsdown offers different configuration approaches and new capabilities. The skill provides detailed option mappings showing how each tsup configuration parameter corresponds to tsdown equivalents, including cases where options have been renamed, consolidated, or replaced with new tsdown-exclusive features. Understanding these differences is essential for ensuring your migrated configuration produces the same output quality and build performance.
How do I convert tsup config to tsdown?
tsdown-migrate provides automated config transformation capabilities to convert your tsup configuration file to tsdown format. The skill includes complete option mappings that show how to translate each tsup setting into its tsdown equivalent. You'll map options like entry points, output formats, external dependencies, and other build parameters. The transformation process is designed to be systematic, allowing you to either manually update your config file using the mappings or use automated tools provided by the skill to handle the conversion with minimal manual intervention.
What should I do about tsup deprecation warnings during migration?
tsdown-migrate addresses deprecation warnings through a safe two-stage migration process. When you encounter deprecation warnings from tsup, the skill helps you resolve them by identifying which tsup options are deprecated and showing you the recommended tsdown replacements. The two-stage approach allows you to first update your configuration to eliminate warnings while still using tsup, then transition to tsdown in a second phase. This ensures you can migrate at your own pace while maintaining a working build throughout the process, reducing the risk of breaking changes.
What changes do I need to make to package.json when switching from tsup to tsdown?
tsdown-migrate guides you through updating your package.json dependencies, scripts, and configuration fields for tsdown. You'll need to replace tsup with tsdown in your devDependencies, update your build scripts to use tsdown commands instead of tsup, and potentially modify any configuration field references (such as changing tsup-specific fields to their tsdown equivalents). The skill ensures you understand which package.json modifications are necessary for a complete transition, helping you maintain compatibility with your project's build pipeline and development workflow.
What new tsdown-exclusive features become available after migration?
tsdown-migrate introduces you to new tsdown-exclusive features that become available once your project has successfully migrated from tsup. These advanced capabilities are designed to enhance your bundling workflow and build performance beyond what tsup offered. By completing the migration process guided by this skill, you'll be positioned to take advantage of tsdown's modern architecture and innovative features, allowing you to optimize your library bundling further and leverage Rolldown's latest improvements in your TypeScript projects.
SKILL.md
rendered from the published skill — quoted content, verbatim
Migrating from tsup to tsdown
Knowledge base for AI agents to migrate tsup projects to tsdown — the Rolldown-powered library bundler.
Target Version: Two-Stage Migration
tsdown v0.23 removed all previously-deprecated tsup compatibility options — bundle, outExtension, publicDir, removeNodeProtocol, injectStyle, and skipNodeModulesBundle are no longer recognized. They fail TypeScript type checking and are silently ignored at runtime, so a missed mapping on v0.23+ produces wrong output without any error. Migrating directly to v0.23+ is therefore unsafe. tsdown v0.22.14 is the last version that still accepts these options and flags each one with a deprecation warning, making it the safe migration checkpoint. Migrate in two stages:
- Stage 1 — migrate on
tsdown@0.22.14: Installtsdown@0.22.14, migrate the config per the tables below, run a build, and resolve every
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 5 files
skills/tsdown-migrate/README.md
skills/tsdown-migrate/SKILL.md
skills/tsdown-migrate/references/guide-differences-detailed.md
skills/tsdown-migrate/references/guide-option-mappings.md
skills/tsdown-migrate/references/guide-package-json.md