-
Notifications
You must be signed in to change notification settings - Fork 390
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
Feature request: Collocate extracted and compiled messages per component #422
Comments
There's a PR to add similar functionality #326 |
@tricoder42 In the mean time, i set a |
Wait, does #326 actually solve all of @revskill10's problem? It seems like he wants splitting of both source catalogs and compiled message catalogs, but RFC-002 (which #326 implements) has a big note at the top that reads:
This makes it seem as though #326 will actually only solve part of the problem addressed in this issue, and will not actually make things easier for folks who would like to split their compiled message catalogs to be more in-line with their code splitting approach. This is a challenge I currently face: our whole application, some of whose pages contain non-trivial amounts of text, is split up via react-loadable to ensure that each page only loads what it needs, but having a single compiled message catalog partially negates the benefit of this approach, since it means that every single page's text will need to be loaded in order for the user's browser to render the current page. Update 2019-11-14: It looks like #503 is about addressing the problem I've described here. |
I'd love to have extracted/compiled messages files to be collocated per components when running with
lingui extract
andlingui compile
instead of having all terms located in one bigmessages
file.This is for code splitting when SSR.
Currently, i have to manually change the locale folder when running compiling to enable this feature.
Suggestion: If the
extract
andcompile
allow for--mode=component
, we can achieve this feature.There should be a helper to merge those splitted compiled
messages.js
file into onemessages.js
file too. Something like this:Recommended folder structure:
before:
after:
The text was updated successfully, but these errors were encountered: