Open
Description
Describe the bug
When setting export const dynamicParams = false
on a [slug]
route, it seems to take precedence over rewrites.fallback
, which is a discrepancy to how Next.js works by default.
Steps to reproduce
- Repro: https://github.com/lauri865/opennext-routes-repro
- Run
pnpm dev
and go to http://localhost:3000/issue (works fine, you should see a Github issue page) - Run
pnpm preview
and go to http://localhost:8787/issue (witness a 404 page)
Expected behavior
If routes are statically generated, rewrites.fallback
should take precedence.
@opennextjs/cloudflare version
1.0.4
Wrangler version
4.16.1
next info output
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:39 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 22.15.0
npm: 10.9.2
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 15.2.0 // There is a newer version (15.3.2) available, upgrade recommended!
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.8.3
Next.js Config:
output: N/A
Additional context
No response