Add tsdown-based preset for Solid library builds
Describe The Problem To Be Solved
Hi! Following the new Solid support in tsdown docs/recipes/solid-support.md and tsup is not actively maintained, I’d like to propose to replace tsup with tsdown-based preset.
Suggest A Solution
Proposal:
- update the template to use tsdown + rolldown-plugin-solid (or unplugin-solid)
References:
- rolldown-plugin-solid: https://github.com/g-mero/rolldown-plugin-solid
- unplugin-solid: https://github.com/unplugin/unplugin-solid
I’m willing to make a PR for this. Please let me know if you have a preference for rolldown-plugin-solid vs unplugin-solid as the default.
Personally I just stick to esbuild so I don't know what's the best tsup replacement. Tsup was very opinionated, and especially the tsup-preset-solid, which makes for a easy solution for most simple cases, but fails to adapt to custom needs. Neither was the rollup solid preset. People keep asking about some css stuff. For solid-devtools and solid-primitives I needed to built multiple packages at once, and with different configurations. So I didn't really like tsup and the preset after some time. I'm not sure if just replacing tsup with tsdown is the best option. Versus just showing how you can assemble the necessary pieces for building a package, and explaining what the necessary pieces are—types, source maps, precompiled export, preserved jsx, etc. Not sure, maybe that's just too much work.