nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Lost Route params when using different method suffix files

Open manniL opened this issue 2 months ago • 0 comments

Environment

Stackblitz

Reproduction

https://stackblitz.com/edit/nitro-2389

  1. Open /a/o - see alpha and omega params present (correct)
  2. Open /a/delta (delta is the name of the other folder here), see only the alpha param.

To "resolve"/"have a workaround:

  1. 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

manniL avatar Apr 23 '24 11:04 manniL