Over the last few years, my team has developed a web app with web maps using ArcGIS JS version 3. We opted to use the CDN (script src https://js.arcgis.com/3.36/) instead of hosting the entire SDK ourselves.
Over the last few years, we have built up quite a number of dojo templated widgets that integrate with the ArcGIS map, and just recently have began to notice that our page loads are really slowing down quite a lot because the web browser is initiating an HTTP request for every single module.
I'm been searching for a way to reduce the number of HTTP requests on page load, and the only suggestions I have been able to find are to use the Dojo build system. I've been looking into the dojo build system, but it seems very complicated to get ArcGIS JS included in the mix.
This is the only decent example I've been able to find so far that isn't outdated: https://github.com/Esri/jsapi-resources/tree/master/3.x/bower/dojo
With this example project, the "dist" folder after building ends up being over 300MB in size. It seems to be including all of the dojo libraries as well as the ESRI libraries. I am trying to avoid hosting all of that.
Is there any way possible for the dojo build system to only build our "custom" AMD modules and still use the ESRI ArcGIS CDN at the same time or is something like that impossible?