In an Dojo 1.7 AMD web app you can define also arbitrary data in the config object (http://dojotoolkit.org/reference-guide/loader/amd.html).
The configuration object can also be used to set arbitrary, application-specific configuration data. All properties of a configuration object are shallow copied to require.rawConfig
I looked to the requirejs config page (http://requirejs.org/docs/api.html#config), but I did not find a similar feature here. But I did not look into the source code.
Is there a possibility to store arbitrary infos in the requirejs config and get access to it?
Thanks alot in advance
Wolfgang
As far as I can see it is not supported.
You need to insert 1 line in the require.js source code to get this feature.
Here is an example:
Along with the normal values you store your arbitrary information.
Then, you have to open the requirejs source code with a text editor.
Approximately in line 380 – 390 (depends on your version), function “makeRequire”:
This function calls another called “mixin”:
After “isBrowser” write “rawConfig: config”.
Now, in your amd module:
Update:
This feature will be implimented in requirejs 1.1.
https://github.com/jrburke/requirejs/issues/182