How to use a simple Dojo 1.8 build?

890 Views Asked by At

I have written an application that relies on Dojo (version 1.8) hosted on the Google CDN. The code looks like this and works fine:

<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/dojo.js"></script>
<script>
require(["dijit/form/TextBox", "dijit/form/Button", "dijit/form/Select", "dijit/form/ComboBox", "dojo/store/Memory", "dijit/Tooltip", "dojo/domReady!"],function(TextBox, Button, Select, ComboBox, Memory, Tooltip) {
// my code here
});
</script>

Now, I am trying to get a local, simple build of dojo for users who don't have access to the CDN. I went to build.dojotoolkit.org, selected my modules, and retrieved a single custom build dojo.js (size ~400 kb). I then uploaded it to my server and modified my code:

<script src="pathtoserver/pages/dojo.js"></script>
<script>
require(["dijit/form/TextBox", "dijit/form/Button", "dijit/form/Select", "dijit/form/ComboBox", "dojo/store/Memory", "dijit/Tooltip", "dojo/domReady!"],function(TextBox, Button, Select, ComboBox, Memory, Tooltip) {
// my code here
});
</script>

This is not working. I assume that I am missing a simple step, for example the need to declare a config, but unfortunately I couldn't find any tutorial or example on how to work with a simple build.

[Update] The errors I am getting are 404 not found for the following files:

  • pathtoserver/pages/resources/blank.gif
  • pathtoserver/dojox/gfx/svg.js

Of course I don't have anything at those locations, I only uploaded to the server the content of the zip files returned by the online build tool: dojo.js and the nls folder with localization files.

1

There are 1 best solutions below

3
On

More than dojo.js may be required, such as localization bundles, templates (if not inlined) etc. build.dojotoolkit.org should give you a zip to use. Also, take a look at the network panel and it should tell you what's missing.