Hello,
I'm currently building a prototype app with the new @Anonymous User/core (4.18.1) package and Nx Angular monorepos (Angular 11).
If I build the application I get a number of compiler messages.
Warning: E:\Projekte\nx-hwrm\nx-hwrm\libs\shared\feature-mapping-esri\node_modul
es\@arcgis\core\intl\moment.js depends on 'moment/locale/ko.js'. CommonJS or AMD
dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependenc
ies
Warning: E:\Projekte\nx-hwrm\nx-hwrm\libs\shared\feature-mapping-esri\node_modul
es\@arcgis\core\intl\moment.js depends on 'moment/locale/ja.js'. CommonJS or AMD
dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependenc
ies
and
Warning: ./libs/shared/feature-mapping-esri/node_modules/@arcgis/core/core/worke
rs/workers.js 5:863-872
Critical dependency: the request of a dependency is an expression
Warning: ./libs/shared/feature-mapping-esri/node_modules/@arcgis/core/core/worke
rs/WorkerFallback.js 5:2264-2273
Critical dependency: the request of a dependency is an expression
also the build generates more than 170 numbered bundles together 8MB. If I also include the whole esri assets folder this is another ~22MB.
I followed this guide:
https://developers.arcgis.com/javascript/latest/es-modules/
Esri assets are copied to output dist folder with angular.json:
"assets": {
{
"glob": "**/*",
"input": "libs/shared/feature-mapping-esri/node_modules/@arcgis/core/assets",
"output": "assets/"
}
}
Is there a way to have a more compact Angular build?