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

fix: ignore root when prerendering using strategy: 'prefix' #2894

Merged

Conversation

BobbieGoede
Copy link
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Resolves #2855

Not sure how to test this exactly 🤔

These changes removes/ignores the / entry route added by nitro during prerendering and adds localized entry pages to use instead. This also excludes the / route from the generated build, which I think is/was the original behavior when running generate with strategy prefix (currently without these changes this throws an error).

When not prerendering we re-add the index page (not localized) so that requests on root can be redirected.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@BobbieGoede BobbieGoede requested a review from kazupon April 2, 2024 16:26
@BobbieGoede BobbieGoede self-assigned this Apr 2, 2024
Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
LGTM!

@kazupon kazupon merged commit 62dfff5 into nuxt-modules:main Apr 2, 2024
7 checks passed
DarthGigi pushed a commit to DarthGigi/i18n that referenced this pull request Apr 16, 2024
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.

No match found for location with path "/"
2 participants