filesystemRoutingRoot

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

Do not 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