[dojo-contributors] Module formats for the browser

James Burke jburke at dojotoolkit.org
Fri Mar 26 16:05:52 EDT 2010

On Fri, Mar 26, 2010 at 9:53 AM, Kris Zyp <kzyp at dojotoolkit.org> wrote:
> That's fine with me. Do you have a link to your distribution or some
> example modules that have been converted that we could look at? How does
> that impact the size of base dojo.js? Can I start using it now?

I put two builds up, an unminified (called it uncompressed by
accident) and a minified one:


not minified:

These builds are from that 1.4 branch as of about 2 hours ago. These
builds may go away at some point. Note that they are in a "temp"

I just use Dojo Core and Dijit for my project, and even then not many
Dijits, mostly the base classes. In particular, dojox.gfx may not
work. Then again, it may, since the old loader is in there, but I have
not tried.

To get a feel for how require() is used to load an app, look at these
converted themeTester files:

not minified:


The size for dojo.js, minified and gzipped (CDN below is Google CDN):
require+dojo: 30.8 KB
CDN dojo.js: 29.7 KB
CDN dojo.xd.js: 33.4 KB

require+dojo version can handle xdomain modules by default, so given
that, I think the size difference is not too bad. Both dojo.xd.js and
require+dojo.js include i18n handling logic. require+dojo also include
the text! plugin so basically has the equivalent of dojo.cache built
into it. require+dojo was minified via Closure Compiler while the
others were done via Shrinksafe, which explains some of the

As mentioned before, we can save some bytes by trying to build pragma
out some of the traditional dojo loader stuff.


More information about the dojo-contributors mailing list