JavaScript’s New ‘Import Defer’ Is a Trap. Here’s the Truth.
ECMAScript’s new ‘import defer’ promises the holy grail of synchronous-looking code that loads lazily. But while it delivers a massive performance win, it breaks the assumption that top-level code runs eagerly. If you aren’t careful, your polyfills and global state will silently break.