Visits to this blog

Using a different filename than dojo.js

By default, Dojo requires that it’s main file be called dojo.js. This is essentially because it needs to be able to find the path to the folder in which it is stored so it can remotely load resources.

However, there are situations where you’d like to have multiple different builds ready to use in the same folder, optimised for different pages or applications. For example, one file could have the dojo.widget package for applications that use widgets and you could call it dojo_widget.js, whereas another could just have the dojo.storage package and be called dojo_storage.js.

To enable this behaviour, you have to tell Dojo the base path to it’s folder. To do this, set the djConfig.baseScriptUri in the page using the non-standard file. E.g.