Hey all,
I hoped I wouldn't have to post this - but my thinking is coming up with zero and Google only produces a single result (Github of "@esri/arcgis-html-sanitizer").
I'm trying to modernize my current AMD code to ES modules however I can't get past the initial import X from "X" stage.
It seems that certain imports cause the following error to occur: "Uncaught TypeError: Failed to resolve module specifier "@esri/arcgis-html-sanitizer"."
So far I've found the following imports: MapView and IdentityManager trigger the error so far.
The only result on Google points me to: https://github.com/Esri/arcgis-html-sanitizer
So I install "@esri/arcgis-html-sanitizer" and attempt to import the above, above my MapView/IdentityManager imports using the following:
import { Sanitizer } from "/node_modules/@esri/arcgis-html-sanitizer/dist/umd/arcgis-html-sanitizer.min.js";
In my understanding it should be pointing to a .js file, like the other imports but there isn't one in the main directory and I've tried pointing it to every single version available in the dist subfolders.
Obviously it gives me a 404 error when I try and point to the "@esri/arcgis-html-sanitizer directory itself and all other iterations give me the following:
"Uncaught TypeError: Failed to resolve module specifier "@esri/arcgis-html-sanitizer". Relative references must start with either "/", "./", or "../"." - I know this means I'm not pointing to it correctly, but I can't work out what I'm supposed to be pointing to.
Can someone put me out of my misery?