Describe the bug
We went through a process to upgrade our Angular app and all of its packages only to discover our map did not load in our production configuration after migrating to Angular 12. We attempted to reproduce using the Esri sample app, and were able to cause the issue with both 4.20 and vnext.
The error is: TypeError: Property description must be an object ...
To Reproduce
Steps to reproduce the behavior:
- Download the Angular sample: https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-angular-cli
- Update to vnext: npm install @arcgis/core@next
- Run the app in production mode: ng serve --configuration=production
- Or run it via http-server:
ng build --prod
http-server dist/
Expected behavior
The map should be displayed.
Screenshots

Browser
What's your OS?
- OS: Windows 10* 64-bit
- Device: Windows desktop PC
API version (check your console)
- ArcGIS API for JavaScript 4.21.0-next.20210810 [Revision: d8d62578]]
Additional context
We observed the problem did not manifest when we disable build optimization via:
"optimization": false,
in angular.json
Describe the bug
We went through a process to upgrade our Angular app and all of its packages only to discover our map did not load in our production configuration after migrating to Angular 12. We attempted to reproduce using the Esri sample app, and were able to cause the issue with both 4.20 and vnext.
The error is: TypeError: Property description must be an object ...
To Reproduce
Steps to reproduce the behavior:
ng build --prod
http-server dist/
Expected behavior
The map should be displayed.
Screenshots

Browser
What's your OS?
API version (check your console)
Additional context
We observed the problem did not manifest when we disable build optimization via:
"optimization": false,
in angular.json