privacybydesign / irma-frontend-packages

Collection of frontend related packages, that together form a Javascript "client" to the IRMA server.
7 stars 4 forks source link

Static require statements for translations #63

Closed marlonbaeten closed 3 years ago

marlonbaeten commented 3 years ago

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.

ivard commented 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.

marlonbaeten commented 3 years ago

I was using browserify with swc. Parcel bundler also doesn't support dynamic requires that can't be statically evaluated.