Module naming and declarations
jrburke at gmail.com
Wed May 8 12:57:42 PDT 2013
On Wed, May 8, 2013 at 11:35 AM, Domenic Denicola
<domenic at domenicdenicola.com> wrote:
> From: samth0 at gmail.com [samth0 at gmail.com] on behalf of Sam Tobin-Hochstadt [samth at ccs.neu.edu]
>> There's a default place to fetch files from, because there has to be _some_ default.
> This is the core of my problem with AMD, at least as I have used it in the real world with RequireJS. You have no idea what `require("string")` means---is `"string"` a package or a URL relative to the base URL? It can be either in RequireJS, and it sounds like that would be the idea here. Super-confusing!
What part is confusing? Logical IDs are found at baseURL + ID + '.js',
and if it is not there, then look at the require.config call to find
where it came from.
By not having a default, it would mean *always* needing to set up
configuration or specialized module loader bootstrap script to start a
project, and still requires the developer to introspect a config or
understand the loader bootstrap script to find things.
Why always force a config step and/or a specialized module loader
bootstrap? There are simple cases that can get by fine without any
configuration or loader bootstrap.
More information about the es-discuss