Infinite reload for nuxt static "nuxt-i18n": "^6.20.2",
See original GitHub issueWhen changed the target
to static
and ssr
to true
, started a infinite reload of any page of the website. If I remove defaultLocale: en
the pages stops to reload but translations are not working. Is this a problem with il8n or with my routes?
my config:
i18n: {
parsePages: false,
locales: [
{
code: 'en',
iso: 'en-GB',
name: 'english',
file: 'en.js',
},
{
code: 'ro',
iso: 'ro-RO',
name: 'romanian',
file: 'ro.js',
},
],
defaultLocale: 'en',
vueI18n: {
fallbackLocale: 'ro',
messages: {
ro: require('./lang/ro').default,
en: require('./lang/en').default,
},
},
lazy: true,
langDir: 'lang/',
},
My router:
routes: [
{
path: '/',
component: Index
},
{
path: '/information/terms-and-service',
component: Terms
},
{
path: '/information/privacy-policy',
component: Privacy
},
{
path: '/information/refund-policy',
component: Refund
},
{
path: '/collections/:slug',
component: CollectionItems,
},
{
path: '/en/collections/:slug',
component: CollectionItems,
},
]
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
Infinite reload for nuxt static "nuxt-i18n": "^6.20.2", · Issue #1074
I have an identic page /tags and tags are working fine. Looks like the module is changing the language continuously itself.
Read more >Static Site Generation - Nuxt
With static site generation you can render your application during the build phase and deploy it to any static hosting services such as...
Read more >Migrating Nuxt to 2.7: refresh loop - Stack Overflow
I'm working on migrating a Nuxt.js project from Nuxt@1.4 to 2.7 , and after updating the Webpack config as required, etc.
Read more >Manage static content with Prismic.io and Nuxt.js - Bitbull
While looking for a service to hold static contents on an headless e-commerce project we are building, we chose Prismic.io after a couple...
Read more >Nuxt SSR page reload on a dynamic page - Reddit
Can u share ur nuxt config? Otherwise have you checked the generate property? In static mode it's recommanded to set fallback to true,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This can depend on where you deploy or how you start the static server so it’s hard to help without knowing exactly what you are doing.
But my guess would be that it has something to do with trailing slashes.
You could try setting
router { trailingSlash: true }
in nuxt.config.js.Nope not yet. I faced the problem while workin on my company’s website. I could apply the workaround with the
router { trailingSlash: true }
. I will try to make a reproducible repo on my free time.