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

refactor(lazy): include fallback locale messages in the main bundle #1129

Merged
merged 3 commits into from
Mar 30, 2021

Conversation

rchl
Copy link
Collaborator

@rchl rchl commented Mar 29, 2021

This is an optimization to avoid including the messages for the fallback
locale in Nuxt state.

Since the messages for the fallback locale are always required when
"vueI18n.fallbackLocale" is defined we can include it in the main bundle
and avoid making all server-side responses include it separately. The
amount of data is the same in both cases but this way we can take
advantage of browser caching.

This is an optimization to avoid including the messages for the fallback
locale in Nuxt state.

Since the messages for the fallback locale are **always required** when
"vueI18n.fallbackLocale" is defined we can include it in the main bundle
and avoid making all server-side responses include it separately. The
amount of data is the same in both cases but this way we can take
advantage of browser caching.
@rchl rchl merged commit 057d93b into master Mar 30, 2021
@rchl rchl deleted the fix/sync-fallback branch March 30, 2021 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant