Another helpful place for a hook might be an executeDependencies type thing, currently the list of dependencies returned by instantiate are all loaded and ensureEvaluated is run on them, this makes sense for ES6 modules which always evaluate all dependencies before the module that depends on them, but it means you can't do an alternative evaluation strategy like running ensureEvaluated when the module is imported in the code (when using loading a module from some other system that works that way obviously), currently it's impossible to do that without loading your dependencies through some side channel which would likely break static checking of those dependencies.
On Tue, Jun 24, 2014 at 2:16 PM, Juan Ignacio Dopazo <[email protected]> wrote: > > > > On Tuesday, June 24, 2014 11:38 AM, Calvin Metcalf < > [email protected]> wrote: > > Say you wanted to add a hook which automatically added an export named > filepath to a module is the path to the file > > For this use case and other similar ones it'd be nice if the `metadata` > property of load records would be exposed as part of the modules metadata > in `this` or `Reflect.currentModule()`. > > or add an import just for the side effects (say a shim or something) > > We've been discussing conditional loading for shims and other similar > stuff at https://github.com/systemjs/systemjs/issues/9. > > Juan > > > > -- -Calvin W. Metcalf
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

