A question about Loader baseURL

Shijun He hax.sfo at gmail.com
Tue Aug 28 05:31:45 PDT 2012


On Tue, Aug 28, 2012 at 7:44 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>> As I understand, imports in a/a.js (what in this case also import
>> another 'a/a.js' which should be resolve to 'a/a/a.js') will also
>> delegate to myLoader,
>
> Exactly.
>
>> so it is obviously wrong if myFetch is invoked
>> with two identical arguments.
>
> I don't see why that's wrong at all.

For load('a/a.js') in my.js, myFetch is invoked with:
relURL='a/a.js'
baseURL = System.baseURL = '/path/my.js'

For import x from 'a/a.js', myFetch is also invoked with:
relURL='a/a.js'
baseURL = System.baseURL = '/path/my.js'

How myFetch can resolve identical envokes to different resouce?

> --
> sam th
> samth at ccs.neu.edu


More information about the es-discuss mailing list