In the i18n-js export (generated at app/javascript/src/translations.js) we find all sorts of translations that are not actually used in the frontend (For example an exhaustive list of countries for some reason).
Webpack is not smart enough to filter this data, so we actually export the whole bunch to each pack we build.
We should not do this.
There is an i18n-js settings file at config/i18n-js.yml, in which we can add filters.
Explanation for the filters can be found at https://github.com/fnando/i18n-js (note that we use version 3.9.1, not the alpha version of 4.0).
In the i18n-js export (generated at
app/javascript/src/translations.js
) we find all sorts of translations that are not actually used in the frontend (For example an exhaustive list of countries for some reason). Webpack is not smart enough to filter this data, so we actually export the whole bunch to each pack we build. We should not do this.There is an i18n-js settings file at
config/i18n-js.yml
, in which we can add filters. Explanation for the filters can be found at https://github.com/fnando/i18n-js (note that we use version 3.9.1, not the alpha version of 4.0).