Understanding the 'normalize' Loader hook

John Barton johnjbarton at google.com
Tue Aug 12 14:23:57 PDT 2014


See the implemention in es6-module-loader:
https://github.com/ModuleLoader/es6-module-loader/blob/master/lib/system.js#L117

In traceur we have different code that passes the same tests.

The tests:
https://github.com/google/traceur-compiler/blob/master/test/unit/runtime/System.js

We would map your examples to:

On Tue, 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";
>
 http://example.com/a.js

>    import "./a";
>
  http://example.com/a.js

>    import "/a";
>
 /a.js

>    import "//example.com/a";
>
http://example.com/a.js
>
>    import "http://example.com/a"
>
http://example.com/a.js
>
>
> ...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.)
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140812/d6de9aed/attachment-0001.html>


More information about the es-discuss mailing list