I am working on a large application where I need to async load multiple translations for the same locale (i.e. the application translations + moment locale translation + other).
So, everytime the user changes locale, we would need something like:
translations.en.json
moment/locales/en.json
other/en.json
I am lazy loading them, but I would like to do it in a single request. So that I can do:
import('translations/en').then(() => ...
And that should require all of them. I have managed to write a script that creates one file per each of our supported locales that contains those 3 imports, but webpack would still split it in multiple async chunks. Is it possible to somehow merge them per locale?
Thanks!