From the SvelteKit docs:
By default, SvelteKit will render (or prerender) any component first on the server and send it to the client as HTML. It will then render the component again in the browser to make it interactive in a process called hydration.
I tried digging in the Svelte compiler, but it's not very well documented and clearly not intended to be used outside of vite/rollup etc.
For my use case I want to 1) render a single Svelte component as a static HTML (SSR) and 2) generate a JS file that I can include in my page to hydrate the generated HTML.
Is this possible?
from How do I prerender a Svelte component and manually hydrate it with a JS file?
No comments:
Post a Comment