mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-09 01:22:27 +05:30
Create chunks with intl langs data only for en/ru locales
This commit is contained in:
parent
d45b3da5d6
commit
4404968df2
@ -31,14 +31,18 @@ export default {
|
||||
|
||||
require(locale) {
|
||||
const promises = [
|
||||
new Promise(require(`bundle!i18n/${locale}.json`))
|
||||
new Promise(require(`bundle?name=[name]!i18n/${locale}.json`))
|
||||
];
|
||||
|
||||
if (needPolyfill) {
|
||||
promises.push(new Promise((resolve) => {
|
||||
require.ensure([], () => {
|
||||
require('intl');
|
||||
require(`bundle!intl/locale-data/jsonp/${locale}.js`)(resolve);
|
||||
require.context(
|
||||
'bundle?name=[name]-polyfill-data!intl/locale-data/jsonp',
|
||||
false,
|
||||
/\.\/(en|ru)\.js$/
|
||||
)(`./${locale}.js`)(resolve);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user