ArcGIS API for JavaScript Quick Start guides show "all-in-a-single-html" approach which is good for examples. However how about bigger apps?
I added comment on older issue (closed) at https://github.com/Esri/jsapi-resources/issues/32.
That works on 4.0, but I have requirejs import errors with the latest version today - 4.12:
Script error for "@dojo/framework/shim/Promise", needed by: esri/views/MapView
Script error for "@dojo/framework/shim/AbortController", needed by: esri/core/promiseUtils
Script error for "@dojo/framework/shim/array", needed by: esri/PopupTemplate
Script error for "@dojo/framework/shim/Set", needed by: esri/PopupTemplate
Script error for "@dojo/framework/shim/Map", needed by: esri/core/Evented
Script error for "@dojo/framework/shim/global", needed by: esri/request
Script error for "@dojo/framework/shim/WeakMap", needed by: esri/intl/date, esri/intl/number
Script error for "maquette", needed by: esri/views/overlay/ViewOverlay
Script error for "maquette-css-transitions", needed by: esri/widgets/support/widgetUtils
Script error for "maquette-jsx", needed by: esri/widgets/support/jsxFactory
I mean these require.config paths work on 4.0, but do not work on 4.12
paths: {
'esri': 'https://js.arcgis.com/4.0/esri',
'dojo': 'https://js.arcgis.com/4.0/dojo',
'dojox': 'https://js.arcgis.com/4.0/dojox',
'dijit': 'https://js.arcgis.com/4.0/dijit',
'moment': 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0' // To resolve Script error for "moment/moment", needed by: esri/plugins/moment
}
Repo with sample files for both version is at https://github.com/r-pankevicius/arcgis-js-api-with-requirejs