These approaches are very similar. Question I have is does the resultant layer file include any of the ESRI code resources or simply Dojo defined resources. For example, can an Esri FeatureLayer or Map class be bundled in that layer file or only dojo code?
This thread seems quite old now (in terms of the Arcgis versions that it would apply to). I was curious if we are still unable to create custom Esri builds, as in the case of a product I work on, several additional modules are consistently required on top of those provided in the 3.6 build (such as "esri/nls/jsapi_en-us", "dojox/gfx/svg", "dojo/DeferredList", "esri/toolbars/edit", as well as 33 others). This consistently requires extra network traffic, and slows down the start up of our application.
I'd be really interested in creating, either a custom init.js file, or a supplementary file that contains only the extra module that my application Always requires.
I was wondering if this is something that you are still looking into? I would like to use webpack for building my applications but this is not possible at the moment.
That will probably help you out. I haven't gotten around to trying it yet (dojo builds are my mortal enemy) but Scott and the AGRC team have done all the hard work of how to do it, so it can be done, with a little hackery.
There was also discussion of an Esri JavaSCript Optimizer at the 2014 Dev Summit, but the website (http://jso.arcgis.com) currently is redirected to the JavaScript home page.
There was also discussion of an Esri JavaSCript Optimizer at the 2014 Dev Summit, but the website (http://jso.arcgis.com) currently is redirected to the JavaScript home page.
This looked really promising...looking forward to trying it out.