Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader.prototype.load to take resolved key as input #103

Open
guybedford opened this issue Dec 22, 2015 · 1 comment
Open

Loader.prototype.load to take resolved key as input #103

guybedford opened this issue Dec 22, 2015 · 1 comment
Assignees
Labels

Comments

@guybedford
Copy link

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.

@caridy
Copy link
Contributor

caridy commented Dec 22, 2015

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.

@caridy caridy added the bug label Dec 22, 2015
@caridy caridy self-assigned this Dec 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants