⚠️
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.

.page.js

Environment: browser and server.

A .page.js file can export the following:

The .page.js file is isomorphic: it can run in the browser as well as in Node.js.

The .page.js file is lazy-loaded: it is loaded only when needed which means that if no URL request were to match the page's route then .page.js is never loaded in the browser nor in the Node.js process' memory.