Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an application build using the ArcGIS JavaScript API. I have several classes built with Dojo define. Each class is in a separate file, and everything is working fine.

However, I've minified my classes (using Visual Studio Web Essentials), and I'd like to tell Dojo to use the minified files. I'm using a dojoConfig like the following:

var dojoConfig = {
  isDebug: false,
  packages: [{
    name: 'js',
    location: '/js'

And dojo loads my files like '/js/MyClass.js'. What do I have to do the get Dojo to load MyClass.min.js ? This would be a successful resolution to my problem.

But, even more, I have gzipped versions of those files, so how can I tell Dojo to download MyClass.min.js.gzip?

I'd even like to take it a step further and bundle all of my classes into one download, say MyBundle.min.js.gzip. That not a problem. But, again, how to explain to the Dojo AMD loader that /js/MyClass1 and /js/MyClass2 are both in MyBundle?

All this, given that I'm not using the Dojo build system.

share|improve this question

I hate to answer my own question, but I've found a resolution. ESRI is releasing their JavaScript Web Optimizer, which will bundle and optimize everything into one file. That includes custom classes, Dojo itself, and only the required JavaScript API modules. I saw it at the Dev Summit, and it's pretty interesting.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.