I'm trying to create an Ionic-Angular application with a map on its main page, using ArcGIS ES Modules. I've used the code from https://github.com/Esri/jsapi-resources/blob/master/esm-samples/jsapi-angular-cli/src/app/app.compon... to display the map.
This works OK when I build and run the app in Android. When I try to build and run a desktop app using Electron, though, the code errors here:
if (t = h.url, "image" === (s = h.requestOptions).responseType) {
if (Object(_core_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])("host-webworker") || Object(_core_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])("host-node"))
throw M("request:invalid-parameters", new Error("responseType 'image' is not supported in Web Workers or Node environment"), h)
The code to get the map is in the only layer I know that will result in it showing up in the app UI, but it seems that somehow when trying to run it in an Electron window it's running in an unsupported environment.
What exactly is happening here and are there any ideas on how to resolve it?