This is why I like link[rel=preload]. Easier to set up, easier to debug, and fails in a more predictable way.
It would allow you to fetch a graph of modules (with names) in order from leaves, and execute the leaves as they come. Today, if you have a -> b -> c and you push c, b, then a, you still have to wait for a to evaluate c, because top import in a is what kicks off eval.
-
-
In a large graph, this means that you can't start executing at all until you have an entire subgraph starting from the root, which is deeply suboptimal compared to topsorting the modules and evalling the leaves upward.
-
Suboptimal as in: you would notice this in a big way.
-
To check we're on the same page, you're saying that: If 'c' changes the background color of body to red, you'd expect the bg to become red if <link rel=modulepreload href=a>?
-
I'm saying that yes, but (1) maybe modulepreeval, and (2) not because I want that side effect, but just to allow interleaving of fetch/eval and control latency.
-
hmm, I agree with https://twitter.com/matthewcp/status/931200843692625920 … then
End of conversation
New conversation -
-
-
You can add script type=module tags for b and c.
-
Tweet unavailable
-
In general, I wrote that post because I got a lot of responses like this over my years doing web stuff when people didn't really want to dig into a use case. It became a lonely existence :) At minimum, let's really dig into this?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.