How to use RequireJS with Dojo

As of Dojo 1.6, Dojo Core and Dijit have preliminary support for loading its modules with a loader like RequireJS that understands the AMD API proposal. Only a few of the Dojox modules have been converted to allow AMD loading.

AMD loading is still considered experimental in Dojo 1.6, and it only works by using a source distribution, not one of the built distributions.

Get the template § 1

Ben Hockey has set up a nice template project for getting started with Dojo+RequireJS. The directions are fairly straightforward. Some notes: