Please note that this will not work on stackblitz because of the custom urls, you need to clone it locally.
Describe the bug
When using different domains in combination with an swr route rule, as shown below:
routeRules: {
'/': { swr: 60 }
},
and disabling the route prefix by setting domainDefault: true in the locale objects, only the default translation is cached. This results in a flicker upon the first load when displaying other locales.
I'm unsure whether this issue can be addressed within this module or if it requires upstream support from Nitro. Nevertheless, adding a warning to the documentation would be nice to prevent others from spending hours on debugging this as I did 😅
Environment
Darwin
v20.9.0
3.11.2
3.11.1
2.9.6
pnpm@9.0.4
-
devtools
,modules
,routeRules
,i18n
@nuxtjs/i18n@8.3.0
-
Reproduction
https://stackblitz.com/edit/github-xumxf5?file=app.vue,nuxt.config.ts,pages%2Findex.vue,package.json
Please note that this will not work on stackblitz because of the custom urls, you need to clone it locally.
Describe the bug
When using different domains in combination with an
swr
route rule, as shown below:and disabling the route prefix by setting domainDefault: true in the locale objects, only the default translation is cached. This results in a flicker upon the first load when displaying other locales.
I'm unsure whether this issue can be addressed within this module or if it requires upstream support from Nitro. Nevertheless, adding a warning to the documentation would be nice to prevent others from spending hours on debugging this as I did 😅
I'd be happy to update the docs if needed.
Additional context
No response
Logs
No response