Description:
After having included @abp/ng.core for Angular 9/10, ng build --prod produces a lot of _locale*.js files. I use ngsw and had *.js as a prefetch method, resulting in all locales to be prefetched. I wonder why this many locale files are produced. Can I prevent this or disable this? My app localizes everything from the backend, and I wont probably switch from English anyway as my client does not require localization.
(Or is this an optimization bailout issue and thus not expected behaviour?)
Hi! Today i was upgrading ng.abp from 2.9.x to 3.0.5, and then doing a serve/build has a lot of chunk map of _locale, like @davidzwa . Why this change?

Regards!
Hi @davidzwa
We'll work to reduce the locale bundles, thanks for the information.
Many locale files are created as chunk, but as of v3.3, just 10 (ar, cs, en, fr, pt, tr, ru, sl, zl-Hans, zh-Hant) chunks will be created. If the locale of the language you are using is not one of these locales, you should import its locale file in app.module like below:
// nl.js will include the main bundle.
import { storeLocaleData } from '@abp/ng.core';
import(
/* webpackChunkName: "_locale-nl-js"*/
/* webpackMode: "eager" */
'@angular/common/locales/nl.js'
).then(m => storeLocaleData(m.default, 'nl'));
Note: If the Language Management (commercial) module is installed in your project, close to 500 chunks are still being created.
Much obliged!
Most helpful comment
BREAKING CHANGE
Many locale files are created as chunk, but as of v3.3, just 10 (ar, cs, en, fr, pt, tr, ru, sl, zl-Hans, zh-Hant) chunks will be created. If the locale of the language you are using is not one of these locales, you should import its locale file in app.module like below:
Note: If the Language Management (commercial) module is installed in your project, close to 500 chunks are still being created.