Description
I don't mean to be making work, but I think it's worth generically supporting this __moduleName
identifier for System.register at this point and it is a relatively simple addition to the format of the form:
System.register([], function(_export, __moduleName) {
// ...
});
This allows use cases like relative dynamic loading relative to the module being executed. The argument can even be omitted when it is not needed with binding detection as well.
Up until now I've been avoiding this hoping to make the second argument to System.register the ES loader module context which will provide similar functionality, but I don't think this contextual spec will be appearing for quite some time yet and the use case needs to be properly supported in the mean time.
For the original issue see systemjs/builder#416, and just let me know if there are any questions at all.