Module Loader Comments

Brandon Benvie bbenvie at mozilla.com
Thu Mar 14 12:04:53 PDT 2013


On 3/14/2013 11:03 AM, Kevin Smith wrote:
>
> Also (and this is a separate point), I don't see how in the current 
> design a CoffeeScript translator could be implemented as a custom 
> loader.  As far as I can tell, all loaders encapsulate their own 
> module instance table.  For CoffeeScript, you want the JS module 
> instance table and the CS module instance table to be the same.  Is 
> there a way to have a custom loader share an instance table with 
> another loader, then?

You can't share the table, but you can manually use `loaderOne.set(mrl, 
loaderTwo.get())` after the translate? (I think this would be closest to 
the final evaluation) hook.


More information about the es-discuss mailing list