2

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.

asked Jan 10, 2014 at 17:30

1 Answer 1

3

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.

answered Mar 28, 2014 at 17:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.