Skip to content
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

lazy:true doesn't work correctly #2902

Closed
kominov opened this issue Apr 5, 2024 · 1 comment
Closed

lazy:true doesn't work correctly #2902

kominov opened this issue Apr 5, 2024 · 1 comment
Labels

Comments

@kominov
Copy link

kominov commented Apr 5, 2024

Environment


  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: devtools, modules, i18n
  • Runtime Modules: @nuxtjs/i18n@8.3.0
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-cro1om?file=locales%2Fen.json,locales%2Fru.json,nuxt.config.ts,app.vue,pages%2Findex.vue,components%2Fmenu.vue

Describe the bug

I expect json with ru text will be loading only when i click ru locale. But instead, both files are downloaded at the same time
image

Additional context

No response

Logs

No response

@kazupon
Copy link
Collaborator

kazupon commented Apr 12, 2024

Thank you for your reporting!

Unfortunately, I could not reproduce this issue in my enviroment. 😞

Your nuxt.config.ts has defaultLocale: 'en'.
When you access the root of the page only en.json is loaded.
If you switch to ru once and reload, both en.json and ru.json will be loaded. This behavior is correct. This behavior is correct, because the defaultLocale: 'en' and the switched ru are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants