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

optional route param does't work #14079

Closed
Trezedo opened this issue Jun 4, 2022 · 0 comments · Fixed by nuxt/framework#5300
Closed

optional route param does't work #14079

Trezedo opened this issue Jun 4, 2022 · 0 comments · Fixed by nuxt/framework#5300

Comments

@Trezedo
Copy link

Trezedo commented Jun 4, 2022

Environment

------------------------------
- Operating System: `Windows_NT`
- Node Version:     `v16.13.0`
- Nuxt Version:     `3.0.0-rc.3`
- Package Manager:  `yarn@1.22.18`
- Builder:          `vite`
- User Config:      `buildModules`, `typescript`, `css`, `autoImports`, `vite`
- Runtime Modules:  `-`
- Build Modules:    `@pinia/nuxt@0.1.9`
------------------------------

Reproduction

minimal reproduction: stackblitz.com

Describe the bug

Optional route params do not work, though it was reported #13846 .

Both the path /test/ and /u-author/tag/ return with 404 not found. While ~/pages/test/[[slug]].vue is supposed to enable optional params as the document says.

In file .nuxt/dist/server/server.mjs, the generated route is /test/:slug instead of the expected /test/:slug?:
image

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants