Add to existing app

To get familiar with *.page.js files, 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. Add the vite-plugin-ssr server middleware.

  3. Define and

  4. Create your first .page.js file.

  5. Add the dev and build scripts to your package.json.

Edit this page