Skip to content

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

Merged
kazupon merged 1 commit intonuxt-modules:mainfrom
BobbieGoede:fix/prefix-no-match-found-index
Apr 2, 2024
Merged

fix: ignore root when prerendering using strategy: 'prefix'#2894
kazupon merged 1 commit intonuxt-modules:mainfrom
BobbieGoede:fix/prefix-no-match-found-index

Conversation

@BobbieGoede
Copy link
Copy Markdown
Member

🔗 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
Copy Markdown
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!

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