mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
In `Link`, `router.push`, and `router.replace`, `as` option used to throw for optional catch all routes with url object syntax: optional attribute were not taken into account when checking missing parameters in router change method. This PR just add a condition in the filter callback to filter out optional routes. Fixes #41624 ## Bug - [X] Related issues linked using `fixes #number` - [X] Integration tests added - [X] Errors have a helpful link attached, see `contributing.md`
15 lines
229 B
JavaScript
15 lines
229 B
JavaScript
module.exports = {
|
|
rewrites() {
|
|
return [
|
|
{
|
|
source: '/rewrite-me',
|
|
destination: '/another',
|
|
},
|
|
{
|
|
source: '/blog/:slugs*',
|
|
destination: '/news/:slugs*',
|
|
},
|
|
]
|
|
},
|
|
}
|