Module naming and declarations

Anne van Kesteren annevk at annevk.nl
Tue May 7 11:35:22 PDT 2013


On Tue, May 7, 2013 at 11:18 AM, Jason Orendorff
<jason.orendorff at gmail.com> wrote:
> If module names were URLs, that would definitely be the right thing.
>
> Module names aren't URLs, though. These aren't static links to static
> locations (for reasons discussed in this thread; e.g., it'd be
> counterproductive for backbone.js to have a static URL for underscore
> embedded in it).

But you are treating them as URLs by default (with a small dose of magic).


>> The associated document could work, but that means you'd always be
>> required to use links such as /path/to/script as otherwise the link
>> breaks if the script that does the importing is included from both
>> /doc1 and /example/doc2.
>
> You pointed out this issue earlier, and I replied (on Monday, May 6; search
> for "sweet spot"). What do you think?

I think that because of this you cannot really use the default loader
semantics in most scenarios. Lots of sites reuse a script on several
pages (i.e. documents) with disparate URLs, similar to how they reuse
CSS.


--
http://annevankesteren.nl/


More information about the es-discuss mailing list