fix: prevent 404 for routes consisting solely of an optional parameter (#2798)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Bartek Iwańczuk
Claude Opus 4.6
parent
be813e0dfd
commit
669f62a32a
@@ -78,6 +78,7 @@ they might match:
|
||||
| `blog/[slug]/comments.ts` | `/blog/:slug/comments` | `/blog/foo/comments` |
|
||||
| `old/[...path].ts` | `/old/:path*` | `/old/foo`, `/old/bar/baz` |
|
||||
| `docs/[[version]]/index.ts` | `/docs{/:version}?` | `/docs`, `/docs/latest`, `/docs/canary` |
|
||||
| `[[name]].ts` | `/{:name}?` | `/`, `/foo`, `/bar` |
|
||||
|
||||
Advanced use-cases can require that a more complex pattern be used for matching.
|
||||
A custom [URL pattern][urlpattern] can be specified in the route configuration.
|
||||
|
||||
Reference in New Issue
Block a user