4 ms·
So the argument is that the bad-effects of top-level await are viral. One bad apple in the app entry point's dependency graph stalls evaluation of the main ent
by robpalmer 10y ago
So the argument is that the bad-effects of top-level await are viral. One bad apple in the app entry point's dependency graph stalls evaluation of the main entry point. And to mitigate this risk, you have to segregate out sub-graphs that you safely load via imperative import().
Doesn't the same risk apply if one of the modules in the graph declaratively imports a module hosted on a slow external CDN?
- untog 10y agoIt does, yes. Using a slow, external CDN is a bad idea for exactly that reason.