Skip to content

fix(nuxt): normalize segment catchall pattern before checking for parent#1

Closed
Eazash wants to merge 2 commits intomainfrom
fix/normalize-segment-catchall
Closed

fix(nuxt): normalize segment catchall pattern before checking for parent#1
Eazash wants to merge 2 commits intomainfrom
fix/normalize-segment-catchall

Conversation

@Eazash
Copy link
Copy Markdown
Owner

@Eazash Eazash commented Jun 16, 2025

🔗 Linked issue

resolves nuxt#32365

📚 Description

When a catch-all route is the last segment, it uses the greedy regexp (nuxt#31528). However, if it is used in middle of a path, it uses a more performant regexp (see nuxt#31450).

This change normalizes segment paths to the greedy regexp during parent checks to handle cases where both might be present (eg. if[...id].vue and [...id]/[slug].vue are pages) so that child routes are correctly nested.

@autofix-troubleshooter
Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃

@Eazash Eazash closed this Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested catch-all routes flattened instead of grouped as children after upgrading from Nuxt 3.15.4 to 3.17.5

2 participants