-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
enabling differentDomains leads to navigation issues #1708
Comments
Thank you for your reporting! When we will use defference domain, i18n module is changed routing behavior that is handled such as NuxtLink. |
@kazupon Thanks for your answer. Note that this behavior occurs with hosts different from localhost as well. |
Setting Example NuxtI18nOptionsi18n: {
langDir: 'i18n',
locales: [
{
code: 'en',
name: "English",
domain: 'example.com',
file: 'en.json',
},
{
code: 'fr',
domain: 'fr.example.com',
file: 'fr.json',
},
],
differentDomains: true,
detectBrowserLanguage: false,
skipSettingLocaleOnNavigate: true,
defaultLocale: 'en',
vueI18n: {
legacy: false,
fallbackLocale: 'en',
},
} |
is this related? |
I've just fixed, and released edge version |
Sir, you saved my day 🎉 |
Environment
Darwin
v16.17.0
3.0.0
1.0.0
pnpm@7.17.0
vite
app
,css
,modules
,typescript
,ignore
,i18n
,content
@nuxtjs/i18n@8.0.0-beta.7
-
Reproduction
The code in this stackblitz showcases the issue (but not directly in stackblitz, you have to download the code, then run
npm install && npm run dev
)Describe the bug
Click on any links in the navbar and see that the navigation fails every second click.
In the following screencast, when I navigate from team to home, for example, the first click fails (it navigates but then returns to team very quickly). The second click works.
Additional context
I reproduce this behavior consistently in the minimal repro shared on stackblitz and in the real project where I'm using nuxtjs/i18n
Note that this is triggered by
differentDomains: true
. Maybe I'm missing something obvious in the configuration, but I've tried several combinations and nothing helps.This happens with beta.6 and beta.7.
Logs
No response
The text was updated successfully, but these errors were encountered: