A Svelte version of the vite-plugin-ssr module.
This module demonstrates doing fully prerendered HTML with the correct hydration settings so that your app will load smoothly in any context.
You can try it out here: https://ryanweal.github.io/vite-plugin-ssr-svelte/
Why not use SvelteKit? Using
vite-plugin-ssr you can override pretty much
everything and you could also add other frameworks (such as Vue, React,
others) for specific routes by providing more specific
This repo could be used as a starter for your next project. It is setup to do the typical framework tasks:
We also include some examples of making API calls on the server-side only to fetch your data.
npm run devand enjoy hot reloading as you work.
http://localhost:3000in your browser.
npm run build
npx serve dist/client
To update this package you can follow the normal NPM update procedures.
We have used the built-in
npm shrinkwrapcommand to provide an
npm-shrinkwrap.json rather than the normal
package-lock.json which keeps
this repo fixed at a "known good" state, if you use
npm as your installer.
Be sure to fully test updates if you make changes to your