docs/01-app/03-api-reference/07-adapters/10-routing-information.mdx
The routing object in onBuildComplete provides complete routing information with processed patterns ready for deployment:
routing.beforeMiddlewareRoutes applied before middleware execution. These include generated header and redirect behavior.
routing.middlewareMatchersMiddleware matcher definitions emitted for this build. Use these to decide whether middleware should be invoked for a given request.
routing.beforeFilesRewrite routes checked before filesystem route matching.
routing.afterFilesRewrite routes checked after filesystem route matching.
routing.dynamicRoutesDynamic matchers generated from route segments such as [slug] and catch-all routes.
routing.onMatchRoutes that apply after a successful match, such as immutable cache headers for hashed static assets.
routing.fallbackFinal rewrite routes checked when earlier phases did not produce a match.
Each route entry can include:
source: Original route pattern (optional for generated internal rules)sourceRegex: Compiled regex for matching requestsdestination: Internal destination or redirect destinationheaders: Headers to applyhas: Positive matching conditionsmissing: Negative matching conditionsstatus: Redirect status codepriority: Internal route priority flag