Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server routes params are not working as pages routes #21781

Open
abdaldeen opened this issue Jun 26, 2023 · 2 comments
Open

Server routes params are not working as pages routes #21781

abdaldeen opened this issue Jun 26, 2023 · 2 comments

Comments

@abdaldeen
Copy link

Environment


  • Operating System: Linux
  • Node Version: v16.16.0
  • Nuxt Version: 3.6.0
  • Nitro Version: 2.5.1
  • Package Manager: pnpm@8.6.2
  • Builder: vite
  • User Config: devtools, experimental
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-mehymr?file=server%2Froutes%2Ftest2-%5Bid%5D-test2.ts

Describe the bug

pages/test-[id]-test.vue -> work fine
image

server/routes/test2-[id]-test2.ts -> returns 404
image

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

danielroe commented Jun 26, 2023

Server routes params currently do not support all the same features that ~/pages routes do. This should be documented on https://nuxt.com/docs/guide/directory-structure/server#server-routes.

@pi0
Copy link
Member

pi0 commented Jul 3, 2023

Mixed params support coming with unjs/rou3#52 but please note that "differences" are not a lack of functionality, but rather an implementation decision by Nitro/H3 router using radix3 for sake of performance.

@danielroe danielroe removed the 3.x label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants