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: locale prefixes are not added to route aliases #2962

Merged
merged 5 commits into from
May 30, 2024

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 #2957

This adds locale prefixes to route aliases but requires the experimental scanPageMeta feature to be enabled to work, not entirely sure where in the docs would be appropriate to document this.

πŸ“ 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 May 28, 2024 13:15
@BobbieGoede BobbieGoede self-assigned this May 28, 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!
Your PR look good me.

It depend on scanPageMeta, but I am curious as to when it becomes GA feature. I seem that has performance issue. /cc @danielroe

If it does not become GA, we need to find out another solution.

Copy link
Contributor

I would like to make scanPageMeta GA for Nuxt v3.12 if possible (or v4 if not).

~> nuxt/nuxt#27134

@kazupon
Copy link
Collaborator

kazupon commented May 29, 2024

I would like to make scanPageMeta GA for Nuxt v3.12 if possible (or v4 if not).

Good news!
Thanks @danielroe ❀️

// overrides
nuxtConfig: {
experimental: {
scanPageMeta: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think nuxt i18n should check the scanPageMeta value and warn if it is false.
Because, if that value changes to false, nuxt i18n route aliases don't work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have just added a warning that logs when the feature is not enabled 8cab851 (#2962)!

@kazupon kazupon merged commit 6223696 into nuxt-modules:main May 30, 2024
7 checks passed
@kazupon kazupon added the v9 label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

page alias no have prefix
3 participants