mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Summary - move adapter implementation docs from `app/api-reference/config/next-config-js/adapters` to `app/api-reference/adapters` - keep `adapterPath` as an entry page that points to the new adapters section - add matching Pages Router pointer docs under `pages/api-reference/adapters` - update existing docs links that referenced old `adapterPath#...` anchors to the new adapters routes
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
---
|
|
title: Routing Information
|
|
description: Reference for routing phases and route fields exposed in `onBuildComplete`.
|
|
---
|
|
|
|
The `routing` object in `onBuildComplete` provides complete routing information with processed patterns ready for deployment:
|
|
|
|
## `routing.beforeMiddleware`
|
|
|
|
Routes applied before middleware execution. These include generated header and redirect behavior.
|
|
|
|
## `routing.beforeFiles`
|
|
|
|
Rewrite routes checked before filesystem route matching.
|
|
|
|
## `routing.afterFiles`
|
|
|
|
Rewrite routes checked after filesystem route matching.
|
|
|
|
## `routing.dynamicRoutes`
|
|
|
|
Dynamic matchers generated from route segments such as `[slug]` and catch-all routes.
|
|
|
|
## `routing.onMatch`
|
|
|
|
Routes that apply after a successful match, such as immutable cache headers for hashed static assets.
|
|
|
|
## `routing.fallback`
|
|
|
|
Final rewrite routes checked when earlier phases did not produce a match.
|
|
|
|
## Common Route Fields
|
|
|
|
Each route entry can include:
|
|
|
|
- `source`: Original route pattern (optional for generated internal rules)
|
|
- `sourceRegex`: Compiled regex for matching requests
|
|
- `destination`: Internal destination or redirect destination
|
|
- `headers`: Headers to apply
|
|
- `has`: Positive matching conditions
|
|
- `missing`: Negative matching conditions
|
|
- `status`: Redirect status code
|
|
- `priority`: Internal route priority flag
|