Using the built-in Dojo packages is great and all, but what about making your own custom package? You can create custom packages in your local folders, and reference them through your dojoConfig
object. In the dojoConfig
object, you can add a packages parameter that contains an array of JavaScript objects. Those package objects should contain a name attribute, which is a reference to your package, and a location attribute, which references the folder location. Here's an example of a dojoConfig
object with a reference to a custom package:
<script> dojoConfig = { async: true, isDebug: true, packages: [ { name: "myapp", location: location.pathname.replace(/\/[^/]+$/, '') + "/myapp" } ] }; </script>
In the preceding sample, the package myapp
is referenced, and all the files for that package are loaded into the myapp
folder under the current page. So, if this page was shown at http://www.example.com/testmap/
, the...