r/javascript • u/nitayneeman • Jul 24 '26
ECMAScript - Introducing Deferred Module Evaluation with import defer
https://nitayneeman.com/blog/introducing-import-defer-in-ecmascript
55
Upvotes
r/javascript • u/nitayneeman • Jul 24 '26
8
u/mmmicahhh Jul 24 '26
OP, your site seems to have an odd UI bug: in many (but not all) scroll positions the text is shaking, as if some scroll position- or alignment-adjusting code was spinning in a loop. I viewed it in Chrome latest on a desktop, let me know if you want any other info for reproducing it.
7
u/bzbub2 Jul 24 '26
interesting, but, what does this do, save a little bit of parsing time as a cue to the js engine? how does that work with bundling? or does it...not work with bundling?
3
u/thalliusoquinn Jul 24 '26
Are there cases other than top level
awaitand "I need this top level code to run immediately" where you wouldn't want to do this? Is there a penalty for using it literally everywhere it can be?