Custom dojo builds not working with API

Discussion created by _js on Oct 26, 2011
Latest reply on Apr 4, 2012 by dhollema

I have been struggling for a while now trying to get a custom dojo build working with version 2.5 of the API.

I'm writing a mobile application and I'm trying to reduce the number of HTTP requests made.

My code uses components from dijit and dojox. When I dojo.require these components, roughly 75 files are requested from serverapi.arcgisonline.com. This is not ideal.

I've done a custom dojo build that contains the dojo core, and the dijit and dojox pieces I require.

I include my custom build locally in a script tag at the top of my page. Next, I include the JS API 2.5 either from serverapi.arcgisonline.com, or locally.

Regardless of what I do, my dependencies are resolved one-by-one from serverapi.arcgisonline.com, leading to a massive number of HTTP requests - even though I have previously included a build containing the desired components.

Am I missing some key about the dojo build system? I was under the impression that dependencies are only loaded once.

Is it possible to use dojo build layers with the ESRI JS API?