I am having serious trouble running angular application that uses webpack module federation remote entries with esri JS api ES modules.
The idea is that there is a shell application that consumes remote entries, shared library that provides some business logic and is used by multiple components, and finally there is plugins application that provides some remote entries (plugins) for shell. In shared library there is service for creating a map view. In plugins application there is map-component (plugin) that provides UI components for created map view (home, scale, locate).
When I run the plugins application on its own everything works as expected (home, scale, locate).
But when I consume map-component from remote entry in shell app, nothing works at all (scale is frozen, locate zooms to other place and home does nothing) and console is filled with errors like this one:
„Logger.js:5 [esri.core.Accessor] Accessor#set Assigning an instance of 'esri.geometry.SpatialReference' which is not a subclass of 'esri.geometry.SpatialReference“
The extent created after clicking on home button seems all right exanimating it in debugger, but when used in mapView.goTo, it does nothing.
The app is using esri JS api via ES modules from npm package @arcgis/core.
Fully reproducible example with readme.me to reproduce issues can be found here:
https://github.com/bigend/esri-webpack-module-federation-issue
If anyone could just shed some light on this, or at least explain to me what that error is supposed to mean, I would be really very grateful.