You can add additional packages after downloading by calling the request using the configuration object.
Eg: require({ packages: [ {"name": "myLib", "location": "release/myLib"} ] });
This, however, will create another instance of Dojo, according to the documentation ( dojo / _base / config ). In addition, this is version 1.8 ; I do not think this works with 1.7 .
I thought it was possible to direct an additional object to dojoConfig or require.rawConfig, but they would not be loaded by the loader. It seems that the configuration cannot be changed after loading.
You can pass the required configuration object, therefore:
Eg. dojoConfig.packages.push({"name": "myLib", "location": "release/myLib"}); require(dojoConfig, [...moduleIds...], function(...arguments...) { });
This will work for an individual user, but will not change the global configuration (and therefore will not work in define () or subsequent calls to require () ). Again, I use 1.8 here, but I assume that it works in 1.7 .
Could there be another easier way to make this work something that someone else has found?
source share