Understanding the 'normalize' Loader hook

David Herman dherman at mozilla.com
Tue Aug 12 14:39:56 PDT 2014


On Aug 12, 2014, at 2:05 PM, Ian Hickson <ian at hixie.ch> wrote:

> Assume my script is http://example.com/test.js, and assume that there is 
> no extra information (nobody has registered any module names or anything 
> like that). If I do:
> 
>   import "a";
>   import "./a";
>   import "/a";
>   import "//example.com/a";
>   import "http://example.com/a"
> 
> ...am I supposed to end up with the same normalized name for all five?
> 
> How many entries in [[Modules]] should this result in?
> 
> (I understand that the answer depends on the default loader; what I'm 
> asking is, what should the default loader's behaviour be.)

This is part of the design work we're actively working on. I'd ask you to hold off until we have some more information for you. I'll keep you posted -- we should have some more details for you soon.

Dave



More information about the es-discuss mailing list