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

Split and lazy load i18n locale json #325

Open
williamchong opened this issue Nov 5, 2020 · 1 comment
Open

Split and lazy load i18n locale json #325

williamchong opened this issue Nov 5, 2020 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@williamchong
Copy link
Member

Currently webpack packs all locale json into a same js file with other modules. Since it is a common module, every entry point will load this js. Having all locales in there bloats up this js file, thus increasing every page's js parsing time.

We should consider splitting up the locale json via webpack lazy import and lazyload it into the i18n module.

@williamchong
Copy link
Member Author

Ref: we could write something similar to https://github.com/likecoin/like-co/blob/b1bde01cb9d4e91bc9d04ccdff202981d098dff2/plugins/vue-i18n.js#L50
but the i18n store here might be different thus need to confirm the flow is correct

@williamchong williamchong added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant