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

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