Loader.prototype.load to take resolved key as input
Opened this issue · 1 comments
Currently, loader.prototype.load
will take a name
and referrer
and run the resolve hook just like loader.prototype.import
.
Since the goal of loader.prototype.load
is to provide a lower-level control over exactly what hook values are set for a specific module in the registry, it may be worth expecting the input to already be a resolved module key in the registry. This is how the previous loader specification was written as well - to not run normalize in loader.prototype.load
.
The benefit of this is that we know for a fact then that there is no risk that resolve
will alter the name given if we know the exact module name we want to set in the registry (say for a URL). If an unresolved name is needed, the loader.prototype.resolve
function is available to use first manually if necessary.
agreed, there are some things that will have to change in this regards. I faced a similar issue yesterday when working on the referral implementation. referral should be a key from the corresponding registry it seems.