Annotate dynamic imports with the translation keys the chunk contains
Fixes issues with dynamically loading translations where routing isn't guaranteed to hit the origin the initial request was served from. This will allow looking up a translation by key instead of the id of the chunk that contains it.
Essentially I had to split the i18nManifest state into its DeferredState and the Map that it resolves to. This way, the server build can wait for the client build to finish (as before) by referencing the DeferredState and the instrumentation plugin can use the Map directly to lookup translation keys.
This is supplemented by PRs in fusion-react, fusion-plugin-i18n, and fusion-plugin-i18n-react.
Annotate dynamic imports with the translation keys the chunk contains
Fixes issues with dynamically loading translations where routing isn't guaranteed to hit the origin the initial request was served from. This will allow looking up a translation by key instead of the id of the chunk that contains it.
Essentially I had to split the i18nManifest state into its
DeferredState
and theMap
that it resolves to. This way, the server build can wait for the client build to finish (as before) by referencing theDeferredState
and the instrumentation plugin can use theMap
directly to lookup translation keys.This is supplemented by PRs in
fusion-react
,fusion-plugin-i18n
, andfusion-plugin-i18n-react
.