Re:Tsdown – The Elegant Bundler for Libraries
by MrJohz on Sunday October 26, 2025 @03:49AM
(#45709881)
I want to move a project I work in over from tsc to tsdown this week at some point, also with the unbundled mode.
Currently we're using tsc with the new build mode to build everything at once, but the result is incredibly brittle and requires a lot of unnecessary extra configuration all over the place that tends to confuse people when they need to add extra packages or make changes somewhere. It's also very slow (hopefully something that will be fixed by tsgo, eventually).
My initial plan was to have a separate tsdown config in each package and use pnpm to build the entire monorepo (or at least, the parts necessary for each sub-application) in parallel. But your config also looks like a useful approach, I'll explore that as well. Thanks for sharing!
Re:Tsdown – The Elegant Bundler for Libraries
by TheAlexLichter on Sunday October 26, 2025 @07:41AM
(#45710951)
Take a look at workspace mode for that! See e.g. https://github.com/vue-macros/vue-macros/blob/main/tsdown.co... for reference.
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.