js-loaders icon indicating copy to clipboard operation
js-loaders copied to clipboard

link hook returning a Module: timing

Open jorendorff opened this issue 11 years ago • 2 comments

If a link hook returns a Module, do we commit that to the registry immediately, even though other modules in the same linkage unit may not have loaded yet?

jorendorff avatar May 09 '13 19:05 jorendorff

@samth and @jorendorff say: Wait until a LinkSet including this module gets linked and committed.

I'll try implementing this.

jorendorff avatar May 28 '13 16:05 jorendorff

Clarifying: this means that the result of a module factory function is not committed until it's linked with the modules that depend on it. (The other alternative would be to commit immediately after the factor function returns.)

samth avatar Oct 09 '13 20:10 samth