Where is this configuration info supposed to go? Couldn't find anything addressing that in the draft. Is it up to the implementation? If so, does it make sense to have it as a property of define.amd, either as a function taking a configuration object or as a plain old object?
As the config is for the loader, it should be off of the loader’s top level loader API.
If the loader supports a global require called `require`[1], then require.config() is something other loaders have chosen.
As the config is for the loader, it should be off of the loader’s top level loader API.
Thanks for your reply. My loader doesn't have a top-level API, it only defines a global variable `define`. So technically I guess `define` is the top-level API. Given that the entire API is a global `define` function, do you think a `define.amd.config` function is alright?
If the loader supports a global require called `require`[1], then require.config() is something other loaders have chosen.My loader doesn't support a global `require`. If `define.amd.config` is no good, is there anywhere else it could live?
There should to be some way to kick off the resolution of modules, besides just define(). define() calls by themselves should just register the existence of a module definition, but not immediately execute the factory function. That will more closely match expectations that people have from other loaders and how it more closely matches the behavior of dynamically loaded modules, whose factory functions are only called because they are part of a top level load dependency tree.
As the config is for the loader, it should be off of the loader’s top level loader API. If the loader supports a global require called `require`[1], then require.config() is something other loaders have chosen.
* The map config is now its own config, not nested under paths or
packages...
map: Object. Optional. See [details under the map section.
It is still nested under packages...look just above in the spec. And I think that is where the equivalent of dojo's packageMap takes place and answers the questions below.
if pkgA depends on "foo/bar" should it get "foo1.2/bar"?
i know how i would like all of this to work but i don't want to make assumptions based on how i'd like it to work. i don't see these clearly spelled out in the spec and i can see that it would be easy for different people to make different interpretations. hopefully we can avoid some frustration later by clarifying this now.
ben...
{ map: { 'some/newmodule': { 'foo': 'foo1.2' }, 'some/oldmodule': { 'foo': 'foo1.0' } } }foo, foo1.2 and foo1.0 are module ID's and not module ID prefixes correct ?
packageMap, paths, and aliases properties, they are all deprecated - map is the configuration option to use moving forwardon http://dojotoolkit.org/documentation/tutorials/1.9/modules_advanced/, which even links to the Common Config draft.