⚠️
The vite-plugin-ssr project has been renamed Vike.
  • If you are using vite-plugin-ssr, migrate to Vike.
  • For new projects, use Vike instead of vite-plugin-ssr.
Vike itself (without extensions) is like vite-plugin-ssr: unopinionated and fully agnostic.

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