Link to the code that reproduces this issue
https://github.com/davecarlson/nextjs-route-handler-rsc-routes-repro
To Reproduce
To Reproduce
1. Clone https://github.com/davecarlson/nextjs-route-handler-rsc-routes-repro
2. npm install
3. npm run build
4. npm run verify:files
Current vs. Expected behavior
I see an extra file being created, meaning on large projects you can hit the Routes created per Deployment in 2x time.
I expect the number of handlers outputs to match the number of route handlers, and the extra .rsc .rsc.segment to not be created
For example, this gets created:
/api/[tenantId].rsc
/api/[tenantId]
/api/[tenantId]/items.rsc
/api/[tenantId]/items
/api/[tenantId]/items/[itemId].rsc
/api/[tenantId]/items/[itemId]
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.6.0: Fri Jul 31 19:19:08 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T6050
Available memory (MB): 65536
Available CPU cores: 18
Binaries:
Node: 24.18.0
npm: 11.16.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 16.3.1 // Latest available version is detected (16.3.1).
eslint-config-next: N/A
react: 19.2.8
react-dom: 19.2.8
typescript: N/A
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Route Handlers, Dynamic Routes, Output
Which stage(s) are affected? (Select all that apply)
Build (Local), Vercel (Deployed)
Additional context
Checked with latest canary build - same issue exists.
I have a vercel build that fails due to hitting the limit : AhJzCWvPRMin8Lez85Q2CQQcqYn4
Link to the code that reproduces this issue
https://github.com/davecarlson/nextjs-route-handler-rsc-routes-repro
To Reproduce
To Reproduce
Current vs. Expected behavior
I see an extra file being created, meaning on large projects you can hit the Routes created per Deployment in 2x time.
I expect the number of handlers outputs to match the number of route handlers, and the extra .rsc .rsc.segment to not be created
For example, this gets created:
/api/[tenantId].rsc
/api/[tenantId]
/api/[tenantId]/items.rsc
/api/[tenantId]/items
/api/[tenantId]/items/[itemId].rsc
/api/[tenantId]/items/[itemId]
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 25.6.0: Fri Jul 31 19:19:08 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T6050 Available memory (MB): 65536 Available CPU cores: 18 Binaries: Node: 24.18.0 npm: 11.16.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 16.3.1 // Latest available version is detected (16.3.1). eslint-config-next: N/A react: 19.2.8 react-dom: 19.2.8 typescript: N/A Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
Route Handlers, Dynamic Routes, Output
Which stage(s) are affected? (Select all that apply)
Build (Local), Vercel (Deployed)
Additional context
Checked with latest canary build - same issue exists.
I have a vercel build that fails due to hitting the limit : AhJzCWvPRMin8Lez85Q2CQQcqYn4