nitro
nitro copied to clipboard
Lost Route params when using different method suffix files
Environment
Stackblitz
Reproduction
https://stackblitz.com/edit/nitro-2389
- Open
/a/o
- seealpha
andomega
params present (correct) - Open
/a/delta
(delta is the name of the other folder here), see only thealpha
param.
To "resolve"/"have a workaround:
- Create a
delta/index.get.ts
as a "duplicate" of the omega[omega]/index.get.ts
handler
Describe the bug
When using same-level folders with index files split by method, the router parameters get lost for requests not having a .method.ts
file in every of the folders, when the path would match a subfolder.
The responsible handler is always correctly resolved though, but route params are missing.
Additional context
Reported in https://github.com/nuxt/nuxt/issues/26903
Logs
No response