Skip to content

Add replacement: tsuptsdown #649

@sxzz

Description

@sxzz

Following up from the discussion in e18e/ecosystem-issues#170, I'd like to propose adding tsuptsdown to the module-replacements dataset.

Basic info

  • Module to replace: tsup
  • Replacement: tsdown
  • Manifest: preferred
  • Replacement type: documented

Why it should be replaced

  • Upstream recommends it. tsup's own README has recommended migrating to tsdown since August 2025. The project is effectively in maintenance mode.
  • Performance. tsdown is built on Rolldown (Rust-based) and is significantly faster than tsup for typical library builds, while producing comparable or smaller output.
  • Size. tsdown's install footprint is now comparable to tsup (~22–26MB vs ~25–35MB) and shrinking further as the dts plugin is integrated natively.
  • Significant adoption. tsup has tens of millions of weekly downloads. tsdown already powers builds in major projects including Vite, Slidev, RSSHub, Rolldown itself, unplugin, and 600+ other projects with >100 stars.
  • Drop-in compatible. tsdown is designed as a tsup successor with a compatible config surface; most projects migrate with little to no config change.

Availability

  • tsdown supports Node.js ≥ 20.19 (current active LTS line), aligning with modern tooling expectations.
  • Available on npm, no native/system dependencies beyond what Rolldown ships.

Migration example

Most tsup.config.ts files map 1:1 to tsdown.config.ts:

// tsup.config.ts
import { defineConfig } from 'tsup'

export default defineConfig({
  entry: ['src/index.ts'],
  format: ['esm', 'cjs'],
  dts: true,
  clean: true,
})
// tsdown.config.ts
import { defineConfig } from 'tsdown'

export default defineConfig({
  entry: ['src/index.ts'],
  format: ['esm', 'cjs'],
  dts: true,
  clean: true,
})

Tooling is also available to automate this:

  • CLI: npx tsdown-migrate
  • AI skill: npx skills add rolldown/tsdown --skill tsdown-migrate

Scope

To echo the concern raised by @43081j in the linked discussion: this replacement is intended only for existing tsup users. It should not be read as a recommendation for projects on other bundlers, nor for projects that don't need a bundler at all.

Happy to open the PR once the direction here is agreed upon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions