Your code is fine, you are just not adding css. You are missing { css: true }
, that’s all.
loadModules(
["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"],
{ css: true } // <-- HERE
).then(([ArcGISMap, MapView, FeatureLayer]) => {
//...
}
CLICK HERE to find out more related problems solutions.