Post

What's the benefit of doing this versus just running tsc? Is that effectively what it's doing or does it still call rolldown under the hood?

That’s right—it’s still built on Rolldown, so you can take advantage of Rolldown plugins, inline dependencies, tree-shaking, clean dist, and more.

Which means today, unbundle is exactly the same as running tsc? We just call rolldown instead of tsc to give us opportunity to run plugins

If you don’t need the extra features tsdown offers(like shims or dual formats...) then tsdown essentially just transpiles TypeScript. By the way, tsdown also automatically adds file extensions (e.g., `.js`) to import statements.

Makes sense to me 👍 Shipping esm - use TSC Shipping dual - use tsdown Shipping esm & want build plugins - use tsdown

Additionally, tsdown is faster than tsc. For example, in the tsdown repository: - tsdown: 354.54ms - tsc: 834.87ms For larger projects, this performance gap will be even more significant.