← All repos

proposal-defer-import-eval

A proposal for introducing a way to defer evaluate of a module

Browse cluster: JavaScript Standard Style Linting
172commits
20contributors
1languages

Tech stack & purpose

This repository contains a TC39 proposal for introducing deferred module evaluation in JavaScript, championed by Nicolò Ribaudo and authored by Yulia Startsev, Nicolò Ribaudo, and Guy Bedford. The proposal addresses a performance problem in large JavaScript applications where executing initialization scripts incurs significant CPU overhead even after modules are loaded, particularly by introducing a new `import defer` syntax that allows modules to be fully loaded but not executed until their properties are accessed. The proposal is currently at Stage 3 and includes implementations in engine262, webpack, and Babel, with the core innovation being that deferred imports return a namespace object that triggers synchronous evaluation only when properties are accessed, avoiding unnecessary work during application initialization without requiring developers to convert their code to asynchronous patterns.

Languages

HTML
100.0%

Contributors