svelteSSRStarter
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
main.tsx
https://stevekrouse--5eca8e3c254011f0a4ea569c3dd06744.web.val.run
This val shows how to compile and run a Svelte app in Val Town with server rendering and client hydration.
The clever part of this app is that we compile the Svelte code for the server and dynamically import it on the server to generate the server HTML.
If you are looking for simpler client-side-only rendering, check out svelteStarter.
Thanks Rich Harris for getting this working!