Caridy Patiño
Caridy Patiño
this will also answer the question from https://github.com/whatwg/loader/issues/72, since there will be no global loader to be mutated.
it also touch on the imperative form of import defined in https://github.com/whatwg/loader/issues/36
this might entirely solve https://github.com/whatwg/loader/issues/89
@guybedford no, `import.loader.load` is just `loader.load()`, which is available today to fetch a module and its dependencies, instantiate all of them, and get them ready to be evaluated.
@guybedford no, you can push module records into the registry (check the example "Controlling the Registry"), but as today, there is no way to process a source text module record...
@guybedford there is not such things as a module name in loader, but a registry key. My position is that the loader doesn't need to give you such mechanism, just...
@matthewp `ModuleStatus.prototype.resolve` just return the promise of the resolve hook, that's all. What @guybedford is claiming is that by removing the other hooks, you loose the ability to feed the...
@guybedford > resolve will now execute as a side-effect for legacy module format cases This is a very good point, yes, resolver hook will have to resolve, inspect and set...
@guybedford it is not exactly like that (what you set into the registry are instance of ModuleStatus), but you get the idea right. and yes, it does preserve the order...
@guybedford correct, it will only work if you already have the CJS module ready to be used before the resolve hook gets invoked (loaded as browserify/webpack bundle of something), or...