4 ms·
I just browsed the Solid website for the first time. It looks somewhat interesting, but one thing I noticed is that rollup seems to be the preferred way to do b
by skybrian 4y ago
I just browsed the Solid website for the first time. It looks somewhat interesting, but one thing I noticed is that rollup seems to be the preferred way to do builds?
I kind of like keeping things simple by using just Preact and esbuild.
- fabiospampinato 4y agoSolid uses a custom Babel transform. Interestingly performance and simple build process aren't mutually exclusive, you can get both, the transform provides (arguably) convenience features mainly.
- iainmerrick 4y agoI recently started using Solid myself, and I was initially skeptical about that too. I love esbuild as it’s simple and fast, and distrust all these other slow and complex JS tools, especially Webpack. But it actually uses Rollup and esbuild by default (via Vite): Rollup for the HTML/CSS and esbuild for the JS/JSX. It works great and it’s plenty fast.
- eyelidlessness 4y agoYou can use Solid without any build tooling (with some caveats). I’m surprised Rollup is prominent at all on the site. The preferred tooling for Solid is its custom Babel plugin, but you can skip it and use hyperscript or html tagged templates. From what I’ve seen on GitHub they’re generally moving towards recommending Vite and their Vite starter is as simple as you can get (far simpler than ESBuild projects I maintain, there isn’t even a need for config or CLI flags or anything), but there’s an ESBuild plugin available. Ultimately all current solutions just wrap the Babel plugin in some form.
- fabiospampinato 4y agoI think if you import it from solid/h then you can use TS' transform. But I guess you would look compatibility with the ecosystem as Solid would work slightly differently.
- eyelidlessness 4y agoYeah, IIRC the two main caveats are that you don’t get some compiler optimizations and you have to wrap prop access in functions. The former probably won’t affect many people, but Ryan has said many times that the minor semantic differences have driven people away from Solid entirely.
- JohnHaugeland 4y ago> I’m surprised Rollup is prominent at all on the site. Solid and Rollup are by the same author.
- eyelidlessness 4y agoI just double checked because this comment made me do a double take, but that isn’t true. Solid was created by Ryan Carniato, Rollup by Rich Harris. Both have R names and I do sincerely get some R names confused in the web tech world. But I’m reasonably certain Rich wasn’t in a band which was the namesake of either technologies, nor has a tattoo from being in that band. ;)
- JohnHaugeland 4y agosorry, i was thinking of svelte, not solid
- TakeBlaster16 4y agoI think the preferred build system is Vite. Assuming you're looking at https://www.solidjs.com/guides/getting-started https://www.solidjs.com/guides/getting-started, they mention Vite first, and under that is manual setup for webpack/rollup/etc if you don't use the template. I can vouch for Vite being nice and simple for basic apps at least.