SWC Support for SolidJS

Reading vitejs's docs, I've came across SWC and I'm wondering if this could be achievable using this: https://github.com/modderme123/swc-plugin-jsx-dom-expressions I also stumbled upon a github feed discussion where they stated that SSR and refs are not supported, please let me know πŸ™
6 Replies
Alex Lohr
Alex Lohrβ€’11mo ago
The problem is that DOM expressions are a moving target, so any implementation would either have to utilize the original babel plugin or follow the official version closely. That's also the reason native solid compilation in bun was never finished.
Walid 🐢🍬
Walid πŸΆπŸ¬β€’11mo ago
So, currently developers are struggling tracing reactive components inside the DOM to make it work with SWC ?
Tommypop
Tommypopβ€’11mo ago
Hi, the SWC plugin is fairly complete and it can compile both the playground and the main site without issues I'm not entirely sure about refs support (I haven't tested it yet and haven't worked on that part of the plugin) And, yeah, neither SSR nor hydration work yet
Tommypop
Tommypopβ€’11mo ago
Here's a config with the plugin set up (it's also got windi in it)
Walid 🐢🍬
Walid πŸΆπŸ¬β€’11mo ago
Glad to hear that, thanks for letting me know. tysm πŸ’–
Tommypop
Tommypopβ€’11mo ago
You're welcome :) Feel free to report any issues you encounter
Want results from more Discord servers?
Add your server
More Posts