Modules loader define method

Erik Arvidsson erik.arvidsson at
Thu Oct 31 07:10:34 PDT 2013

I see that Jason added a Loader.prototype.define to his reference
This is great. It is a much needed capability to allow bundling modules
into a single file.

It allows you to do something like

System.define(['url-a', urlB], ['export var a = "a";', moduleBodyForUrlB]);

However, this is just another form of eval and will therefore not be
available in CSP. Can we come up with something that works in CSP
environments? How about?

module 'url-a' {
  export var a = "a";


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list