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

filesystemRoutingRoot

The export { filesystemRoutingRoot } of _default.page.route.js allows us to change the URL root of Filesystem Routing.

Don't use filesystemRoutingRoot to change the base URL, see Routing > Base URL instead.

filesystemRoutingRoot is usually used for domain-driven file structure.

Example

// /marketing/_default.page.route.js

// We route our marketing pages to `/*` instead of `/marketing/*`
export const filesystemRoutingRoot = '/'
/marketing/_default.page.route.js
/marketing/pages/index/index.page.js
/marketing/pages/about/index.page.js
/marketing/pages/jobs/index.page.js

Result:

PROJECT FILES                                    URL
/marketing/pages/index/index.page.js             /
/marketing/pages/about/index.page.js             /about
/marketing/pages/jobs/index.page.js              /jobs