I want to use dojo in ArcGIS Api for JS , but it give me script error when i import dojo through cdn link. Added SS of the code and Error.
I am using the ArcGIS Map SDK for Javascript with the version 4.29. When i include the dojo using the CDN link then it gives me the Script error as shown in the error Screenshot attached here.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tutorial: Hello Dojo!</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.29/esri/themes/light/main.css">
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"
data-dojo-config="async: true"></script>
</head>
<script src="https://js.arcgis.com/4.29/"></script>
<body>
<script>
require([
"dojo/dom",
"dojo/dom-construct",
"esri/config",
"esri/Map",
"esri/MapView",
], function (dom, domConstruct, esriConfig, Map, MapView) {
esriConfig.apiKey = "API KEY HERE ";
const map = new Map({
basemap: "arcgis/topographic"
});
const view = new MapView({
container: "viewDiv",
map: map,
center: [-118.243683, 34.052234],
zoom: 13
});
});
</script>
<h1 id="viewDiv"></h1>
</body>
</html>