antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I18n Lazy loading

riderx opened this issue · comments

Clear and concise description of the problem

Currently, the translation are all loads on the plugin init, where the chances needed them all is low.
CleanShot 2023-03-26 at 21 49 09@2x
As you can see in my screenshot it's 15% of my index file.

Suggested solution

What I would suggest is to follow the recommendation about lazy load in vue-i18n https://kazupon.github.io/vue-i18n/guide/lazy-loading.html
I'm trying to understand how to do it with yml file.
If I find the solution, I will do a PR, meanwhile, if someone knows how to do it, I'm

Alternative

No response

Additional context

No response

Validations