differentDomains (true) conflict with Nuxt routeRules (ssr: false)
Environment
Nuxi 3.1.2
- Operating System:
Linux - Node Version:
v18.16.0 - Nuxt Version:
3.1.2 - Nitro Version:
2.3.3 - Package Manager:
[email protected] - Builder:
vite - User Config:
runtimeConfig,routeRules,app,css,plugins,build,modules,components,postcss,content - Runtime Modules:
@nuxtjs/[email protected],@nuxt/[email protected],@pinia/[email protected],@vueuse/[email protected],@nuxtjs/[email protected] - Build Modules:
-
Reproduction
Add config routeRules to nuxt.config.ts:
routeRules: {
'/auth/**': { ssr: false },
},
Config i18n module to have differentDomains = true in nuxt.config.ts:
modules: [
[
'@nuxtjs/i18n',
{
strategy: 'no_prefix',
defaultLocale: 'en',
fallbackLocale: 'en',
langDir: './locales',
differentDomains: true,
locales: [
{ code: 'en', iso: 'en-US', file: 'en.yml', domain: 'http://localhost:8800' },
{ code: 'vi', iso: 'vi-VN', file: 'vi.yml', domain: 'http://localhost:8801' },
],
}
]
],
Then go to any page that match routeRules like /auth/login to see it keep infinite refresh loop
Describe the bug
Browser refresh loop when going to route match routeRules (no SSR) with config differentDomains = true
Additional context
No response
Logs
No response
Thank you for your reporting! I've backed from shot vacation.
Unfortunately, We could not your issue. Could you give your minimal reproduction us with stackbliz (nuxt starter) or github repo please? 🙏
Thank you for your reporting! I've backed from shot vacation.
Unfortunately, We could not your issue. Could you give your minimal reproduction us with stackbliz (nuxt starter) or github repo please? 🙏
Here is it: https://stackblitz.com/edit/github-fjfcqz Go to "infinite loop refresh page" in the demo to see the problem
Thank you for your reproduction!
I've faced the warning output in my env
WARN [@nuxtjs/i18n]: The differentDomains option and no_prefix strategy are not compatible. Change strategy or disable differentDomains option.
no_prefix strategy isn't supported with differentDomains: treu
you need to change other strategy.
Thank you for your reproduction!
I've faced the warning output in my env
WARN [@nuxtjs/i18n]: The differentDomains option and no_prefix strategy are not compatible. Change strategy or disable differentDomains option.
no_prefixstrategy isn't supported withdifferentDomains: treuyou need to change other strategy.
Thank you for clear that to me
Hello @kazupon, We have the same issue, event if we use another strategy than 'no_prefix'. Here is a link to the stackblitz to reproduce : https://stackblitz.com/edit/nuxt-starter-iceuqr?file=nuxt.config.ts