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

Handle locales as Vite assets #2776

Open
wants to merge 1 commit into
base: livekit
Choose a base branch
from
Open

Conversation

sandhose
Copy link
Member

This makes it so that locales are handled as assets by Vite.

This has a few advantages:

  • the assets names are hashed, so we can cache them
  • we have an exhaustive list of all locales in the app
  • so i18next can properly load the locales instead of trying a few
  • we reduce bundle size because we have a simple custom loader instead of i18next-http-backend

Here's a diff of the JSON files being loaded with this patch:

image

Copy link
Member

@hughns hughns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sane to me but I'm not familiar with the localazy setup. @fkwp could you sanity check this too?

@sandhose

This comment was marked as resolved.

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.

3 participants