Closed marlonbaeten closed 3 years ago
Seems like a good solution. I'm a bit curious which bundler you are using then? Because I did not run into the issue before.
I was using browserify with swc. Parcel bundler also doesn't support dynamic requires that can't be statically evaluated.
Various bundlers do not support require statements at runtime/with variables. Since there are only a few translations the impact of statically requiring all translations on the total bundle size is negligible.