Conversation
ef12361 to
89ba852
Compare
89ba852 to
814f9c0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
814f9c0 to
5fde15e
Compare
5fde15e to
432e3a3
Compare
Contributor
Author
|
I fixed the issue with vite internal modules being present in output bundle, so it now also works if your app uses webpack ✔️ |
ShGKme
approved these changes
Nov 28, 2023
Contributor
ShGKme
left a comment
There was a problem hiding this comment.
The dist looks good and correct without any extra translations, the translations on server and Talk work fine. Doesn't change a lot in size for 1 app, but multiplies for every app and library.
Contributor
|
Thank you @susnux, awesome work! |
…in app bundles Translations are extracted, not translated strings are discarded (fallback to english) and compressed. On build time the translations are then injected by a vite plugin depending on the importing files so only used translations are imported. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…plitting Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
… longer needed Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
432e3a3 to
a966985
Compare
AndyScherzinger
approved these changes
Dec 22, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ Resolves
On build time:
Then a vite plugin will intercept all imports for 'src/l10n.js' and replace the content with a wrapper that only injects the used translations of the importing file.
Results
Tested with logreader app:
Before
After
🏁 Checklist