You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The [lang].json could grow significantly, usually, a section is unused in the major part of the page, when Next split the code it found that [lang].json is a single entity and put the whole [lang].json in a chunk, when the user does its first load, they should get a lot of translations that they don't want to use yet
Describe the solution you'd like
I am not sure how useTranslation works right now, so, I will suppose the behavior and then these steps should be discarded
for const t = useTranslations("notFound");
t('x') could be splitted into [lang].global.json virtually
t('[category].x') could be splitted into [lang].[category].json virtually
t('[category].[subcategory].x') could be splitted into [lang].[category].[subcategory].json virtually
Previously chunk generated
[lang].json
Proposed chunks generated
[lang].json
[lang].[category].json
[lang].[category].[subcategory].json
Describe alternatives you've considered
I think there is no alternative
The text was updated successfully, but these errors were encountered:
This issue has been automatically closed because there was no recent activity and it was marked as unconfirmed. Note that issues are regularly checked and if they remain in unconfirmed state, they might miss information required to be actionable or are potentially out-of-scope. If you'd like to discuss this topic further, feel free to open a discussion instead.
Is your feature request related to a problem? Please describe.
The
[lang].json
could grow significantly, usually, a section is unused in the major part of the page, when Next split the code it found that[lang].json
is a single entity and put the whole[lang].json
in a chunk, when the user does its first load, they should get a lot of translations that they don't want to use yetDescribe the solution you'd like
I am not sure how
useTranslation
works right now, so, I will suppose the behavior and then these steps should be discardedfor
const t = useTranslations("notFound");
t('x')
could be splitted into[lang].global.json
virtuallyt('[category].x')
could be splitted into[lang].[category].json
virtuallyt('[category].[subcategory].x')
could be splitted into[lang].[category].[subcategory].json
virtuallyPreviously chunk generated
[lang].json
Proposed chunks generated
[lang].json
[lang].[category].json
[lang].[category].[subcategory].json
Describe alternatives you've considered
I think there is no alternative
The text was updated successfully, but these errors were encountered: