| 03:23 | <sis3020> | Come play the top mmorpg https://feetporn.win/ dmcbqw play soon |
| 04:57 | <Jack Works> | I read the request as one to find a solution to the problem that named imports can’t trigger an export accessor, the way destructuring a module.exports can. |
| 05:04 | <Jack Works> | Moddable has also brought up sync loading as an important concern for them I think maybe XS can implement
For the given constraint above, the top level await |
| 06:37 | <Kris Kowal> | Perhaps I can ask naugtur to put together an example cjs virtual module source. I believe he may have adequately addressed Rob’s request in Endo by linking CJS on the plane of default exports, which allows for lazy accessors |
| 07:04 | <Kris Kowal> |
Module#importNow() for Moddable. It is possible to have both Module#import() and Module#importNow(), where the latter just throws if the transitive dependencies have not yet been loaded. For parity with Compartment, that would entail having Module#load(), which would just do the load phase, driving the importHook but not linking, initializing, or executing, such that Module.prototype.import = async () => { await this.load(); return this.importNow(); } |
| 11:16 | <naugtur> | I've checked the current state of Endo and the act of creating a module instance doesn't trigger the getters. They're not triggered if the module is [edit] Looks like the above was interference from the testing method. I'm looking at an example of a getter on cjs |
| 14:34 | <Kris Kowal> | I think it would be at least partially satisfying if CJS to CJS laziness were preserved. Lazy CJS to ESM would be at least possible if ESM just grabs the default. ESM to ESM laziness would be possible too, on the default. But lazy named imports are probably not in the cards. I think sync execution is a different kind of laziness that might give us parity for ESM but with a different mechanism. Deferred execution yet another. |
| 14:38 | <Kris Kowal> | And of course code splitting and tree shaking are both ESM native solutions in the same space. I’m a fan of linear progressive bundles: where the bundle has disjoint sub-bundles from a sequence of entrypoints. |
| 14:40 | <Kris Kowal> | Ten years ago, FaceBook did something similar for code delivery, but non-linearly. Their bundles attempted to predict common combinations, with minimal but nonzero overlap |