next.js
next.js copied to clipboard
Optional catch-all route has highest priority when it should be last priority
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/gifted-wescoff-nd4vf4
To Reproduce
- Start the application
- Visit the
/
route, or a/blah/blah
route and see the[[...slug]]/page.tsx
render - Visit
/resources/page/2
and see that[[...slug]]/page.tsx
renders, notresources/page/[number].tsx
This used to work with the Pages router under Next 12.
Current vs. Expected behavior
Current behavior is catch-all routes have the highest priority Expected behavior is catch-all routes should have the lowest priority
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.18.0
npm: 10.2.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.1.0
eslint-config-next: 14.1.0
react: 18.2.0
react-dom: 18.2.0
typescript: 4.6.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
(Updated the link, copied the wrong one)
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.