The website doesn’t tell me why I would use this instead of just Rolldown.
The “What is tsdown” link goes to a video with pre-roll ads.
I put the video URL into Gemini and asked it what it does. Gemini hallucinated a comparison with Rspack.
I followed the link to documentation from the YouTube description and it took me back to the main page that does not have a description of what it does.
There is an FAQ with a single question:
> Will tsdown support stub mode (similar to unbuild)?
Is there any kind of text description available for what this is and why I – as somebody who is currently writing a lot of front-end code – should care?
I’m using tsdown for a collection of packages and am switching a current project (https://flystorage.dev)over to it. I use it in “unbundle” mode, which doesn’t bundle but does file for file transpilation. To me, it’s an opinionated rolldown configuration with a simplified API. You can script up in a couple of lines of code which packages in a monorepo to compile and what formats to compile for. An example of that can be found here: https://github.com/duna-oss/deltic/blob/main/tsdown.config.t...
Compared to using plain tsc to compile the code, is that it’s a lot quicker. The compiled code has some odd conventions, like using void 0 instead of undefined, but … whatever works!
So far, it has been an easy-entry high-ROI tool that helps me publish TS/JS tools quite easily.
We've switched over our libraries at $WORK to use `tsdown` and it's mostly been a very boring journey, we switched from `tsup` and the DX gains have been massive. Running our `dev` process in the frontend monorepo compiles and bundles all the libraries in less than a second on a cold start compared to `tsup` which was far slower. The biggest gain however was in our CI/CD pipeline where the build servers are much weaker than our developer machines, the `build` step in the quality gate for example went down by over a minute. We've also switched to the new native `tsgo` [0] for type checking, saving us another minute on CI/CD and have migrated a few things from ESLint to Oxlint, which was another easy minute saved. And we switched from Prettier to Biome, and checking the formatting on CI went from ~15s to ~1s. Massive gains are being had in the JS-world from gradual oxidation. Can't wait for Vite with rolldown, we tried that but have a few libraries that depend on SWC which made it a show stopper.
What's the point of bundling libraries? Bundling applications, ok, but libraries? Unless they are dynamically imported straight into browser, then it doesn't matter for any use case I can figure.
5 comments
[ 3.4 ms ] story [ 26.7 ms ] threadThe “What is tsdown” link goes to a video with pre-roll ads.
I put the video URL into Gemini and asked it what it does. Gemini hallucinated a comparison with Rspack.
I followed the link to documentation from the YouTube description and it took me back to the main page that does not have a description of what it does.
There is an FAQ with a single question:
> Will tsdown support stub mode (similar to unbuild)?
Is there any kind of text description available for what this is and why I – as somebody who is currently writing a lot of front-end code – should care?
Think of it as in opinionated Rolldown-"preset" for libraries. It will be used as the foundation of Vite's lib mode revamp.
Compared to using plain tsc to compile the code, is that it’s a lot quicker. The compiled code has some odd conventions, like using void 0 instead of undefined, but … whatever works!
So far, it has been an easy-entry high-ROI tool that helps me publish TS/JS tools quite easily.
[0]: https://github.com/microsoft/typescript-go