⚠️
The vite-plugin-ssr project has been renamed Vike.
  • If you are already using vite-plugin-ssr then migrate to Vike.
  • For new projects, don't use vite-plugin-ssr but use Vike instead.

Add to existing app

To get familiar with vite-plugin-ssr, we recommend to read the React Tour or Vue Tour, or to play with the boilerplates ($ npm init vite-plugin-ssr@latest).

To add vite-plugin-ssr to an existing Vite app:

  1. Add vite-plugin-ssr to your vite.config.js.

  2. Optionally, if you use a server, add the vite-plugin-ssr server middleware.

  3. Define _default.page.client.js and _default.page.server.js.

  4. Create your first .page.js file.