At the moment, the factory function only receives the module/script name. If we inject the dependencies, as well, devs can solve more compatibility problems. For instance, some libraries don't export a global var when they detect and AMD define(). This prevents a legacy script from importing the library. Case in point: jquery.flot.time.js uses timezoneJS.
If flot.js's legacy config looked like the following, we could make this work:
"flot": {
"requires": [ "timezoneJS" ],
"factory": function factory (id, deps) {
window.timezoneJS = deps[0];
return window.$.plot;
}
}
Feels kinda hackish. :(