metaclass-nl / switch-language-example-globalize

An example of dynamically switching language using globalize.js and react-widgets aiming to be compatible with start-react-app.
Other
0 stars 0 forks source link

Lazy dynamic loading using webpack functions #3

Open metaclass-nl opened 5 years ago

metaclass-nl commented 5 years ago

Currently the dynamic loading of translation data and functions is done using custom functions. Webpack has dynamic loading and lazy loading but i could not get it to work. It seems like the runtime does not know about the chunks emitted by globalize-webpack-plugin. However, webpack-manifest-plugin does list them. See src/globalizeWebpackPlugin/LocaleChunkLoader.js.

Solution may be impacted by #2