Apologies for borrowing this thread, but this question seems relevant:
I cannot find any definitive answer or documentation when it comes to relying on DojoConfig for package loading. I'm in the middle of migrating a large ASP.NET / ArcGIS Javascript application from 4.21 to 4.27. I'm really hoping DojoConfig will be supported throughout the remainder of the 4.x lifecycle to buy me a few years of doing the following. It's mainly for my own folders.
let locationPath = location.pathname.replace(/\/[^/]+$/, '');
window.dojoConfig = {
async: true, parseOnLoad: false, packages: [
{ name: "appJavascript", location: locationPath + "/js" },
{ name: "appJavascriptClasses", location: locationPath + "/js/classes" },
{ name: "appHtml", location: locationPath + "/html" },
{ name: "dojo", location: "../../4.21/dojo" },
{ name: "dijit", location: "../../4.21/dijit" }
],
has: {
"esri-native-promise": true
}
}
The last two lines for /dojo and /dijit are really just examples of possibilities. I'm actually trying to cleanse my code of any Dojo references and only use plain vanilla Javascript. This must remain in AMD design, not ES modules. If I'm able to rid the code of all Dojo classes, I'd still need to make use of DojoConfig which appears to be necessary for the Require.js part of the SDK. Unless someone knows how to replace DojoConfig with vanilla Javascript...? I could not piece together a solution without loading require.js and using the "data-main" attribute, which I'd rather avoid.