A question about Loader baseURL

Shijun He hax.sfo at gmail.com
Mon Aug 27 20:38:13 PDT 2012


Example:

== my.js ==

var myLoader = new Loader(System, {fetch: myFetch}
function myFetch(relURL, baseURL, ...) {...}

myLoader.load('a/a.js', ...)


== a/a.js ==
import x from 'a/a.js' // developer means to load a/a/a.js
...


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, so it is obviously wrong if myFetch is invoked
with two identical arguments.


--
hax


More information about the es-discuss mailing list