The below code works when launched when created as an html page in notepad. However, once I try to deploy as part of a Asp.net Core project it will not display unless i change the Arcgis SDK down to 4.15. Anything greater than SDK 4.16 will not work. Can't find any reason for this on the web. Below code returns error: Uncaught TypeError: MapView is not a constructor.
```
<link rel="stylesheet" href="https://js.arcgis.com/4.27/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.27/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Editor"], (
WebMap,
MapView,
Editor
) => {
// Create a map from the referenced webmap item id
const webmap = new WebMap({
portalItem: {
id: "4793230052ed498ebf1c7bed9966bd35"
}
});
const view = new MapView({
container: "viewDiv",
map: webmap
});
view.when(() => {
const editor = new Editor({
view: view
});
// Add the widget to the view
view.ui.add(editor, "top-right");
});
});
</script>
<div id="viewDiv"></div>
```