nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.75k stars 483 forks source link

Lazy loading localeMessages fetches several times when the page changes #2810

Closed barakayevsanjar closed 7 months ago

barakayevsanjar commented 9 months ago

Environment

Reproduction

This is the code that I wrote Link to StackBlitz

Describe the bug

When the app mounts, the localeMessages with the default locale fetches normally. However, when I navigate to certain pages, such as localhost:3000/u/some-user-name or /some-company-name (I have dynamic routes in the pages folder), it fetches again. Sometimes, lazy loading fetches an entirely different locale.

Additional context

No response

Logs

No response

sanjarbarakayev commented 9 months ago

I had a component that I intended to use across multiple sites. Consequently, I created a page and utilized it as a widget component in my current project with iframe. However, the locale messages were fetched twice when the app was mounted within an iframe and I entered pages that used this widget.

Problem solved)

BobbieGoede commented 7 months ago

Problem solved)

Seems like this issue has been resolved? I'll close this issue, let me know if you're still experiencing this issue and I'll reopen!