nitro icon indicating copy to clipboard operation
nitro copied to clipboard

wildcard routes should also handle index by default

Open pi0 opened this issue 2 years ago • 1 comments

Context: https://github.com/nuxt/nuxt/issues/18571

When creating routes/test/[...path].ts, it will only match /test/** but not /test. This is because route matching is running in strict mode and makes a different between these two.

A workaround would be creating routes/test/index.ts with export { default } from './[...path']

I think as an enhancement for DX, we should have a default behavior for doing this.

pi0 avatar May 16 '23 09:05 pi0

is there any timeline on when this is going to be resolved?

why is this even a thing? it seems like radix3 handles this "correctly". I couldn't find the strict mode you noted as the reason. The only thing I found was strictTrailingSlash of radix3 and this doesn't seem to be causing the behavior

btw thanks for the great work

ToBinio avatar Feb 10 '24 18:02 ToBinio