I've come across an error which I am not quite sure how to diagnose. I have an Angular 7 application which uses the ArcGIS JS API and the arcgis-webpack-plugin, configured similarly to this sample app:
GitHub - Esri/angular-cli-esri-map at arcgis-webpack-angular
I need to use some components of the dojo framework directly, importing them like this:
<SPAN class="">import</SPAN> <SPAN class="">*</SPAN> <SPAN class="">as</SPAN> dojo <SPAN class="">from</SPAN> <SPAN class="">'dojo/dojo'</SPAN><SPAN class="">;</SPAN>
<SPAN class="">import</SPAN> <SPAN class="">*</SPAN> <SPAN class="">as</SPAN> domProp <SPAN class="">from</SPAN> <SPAN class="">'dojo/dom-prop'</SPAN><SPAN class="">;</SPAN><SPAN class=""></SPAN>
However, I'm receiving this error at run time (the app does build without error):
DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'localhost:4200/dojo/arcgis-js-api/views/2d/layers/features/Pipeline.js' failed to load.
The error is straightforward - the script at '/dojo/arcgis-js-api/views/2d/layers/features/Pipeline.js' fails to load because it does not exist. But I was wondering if anyone can shed some light on this and help me understand what would cause an app to look in the 'dojo' API files for an ArcGIS JS API file. File '/arcgis-js-api/views/2d/layers/features/Pipeline.js' does exist, I'm just not sure what uses Pipeline.js as that is not something I directly reference or import, and why the app looks inside the dojo API for that file.