⚠
vite-plugin-ssr has been renamed Vike, see migration guide.

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.