Intent to Ship: Deferred imports evaluation ("import defer")

180 views
Skip to first unread message

Caio Lima

unread,
Sep 14, 2026, 12:18:46 PM (9 days ago) Sep 14
to blin...@chromium.org, Nicolò Ribaudo, Olivier Flückiger
Contact emails
nrib...@igalia.comcaio...@igalia.com

Explainer
https://github.com/tc39/proposal-defer-import-eval

Specification
https://tc39.es/proposal-defer-import-eval

Summary
`import defer` allows lazily evaluating ES modules, to reduce the startup impact of modules that are not actually needed for the first JavaScript execution. This provides an easier-to-use alternative to dynamic import. While dynamic import provides more benefits, as it allows deferring loading of modules rather than just evaluation, it has a lot of friction due to its asynchronous nature, and thus it's not always usable. The `import defer` TC39 proposal follows the same syntax as `import source`, but it only works with namespace imports: ``` import defer * as namespace from "./some-module.js" ``` The module will be synchronously executed on property access on the module namespace object. To allow synchronous execution, not all of `./some-module.js`'s dependency tree will be deferred. Modules that contain top-level await will be eagerly executed, leaving only the synchronous parts of the tree for later.

Blink component
Blink>JavaScript

Web Feature ID
import-defer

Motivation
No information provided

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Goals for experimentation
None

Risks


Interoperability and Compatibility
No information provided

Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1952263) Mozilla was originally championing the proposal

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=320867)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No information provided


Debuggability

Changes were added to CDP to properly support feature UX (for detailed information, see https://issues.chromium.org/issues/552666773)

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
Yes
Test262 tests: - https://github.com/tc39/test262/tree/main/test/language/import/import-defer - https://github.com/tc39/test262/tree/main/test/language/expressions/dynamic-import/import-defer

Flag name on about://flags
No information provided

Finch feature name
V8Flag_js_defer_import_eval

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/398218423

Estimated milestones
Shipping on desktop155
Shipping on Android155
Shipping on WebView155


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5071131271888896?gate=6546259918848000

This intent message was generated by Chrome Platform Status.

Dan Clark

unread,
Sep 14, 2026, 5:12:29 PM (9 days ago) Sep 14
to blink-dev, Caio Lima, nrib...@igalia.com, Olivier Flückiger
Web developers: No signals

Is there any sign of developer interest we can point to here?


> Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
> No

I'd expect this to be shipping everywhere -- should this say "yes"?

-- Dan

Caio Lima

unread,
Sep 15, 2026, 9:14:21 AM (8 days ago) Sep 15
to Dan Clark, blink-dev, nrib...@igalia.com, Olivier Flückiger


On Sep 14, 2026, at 6:12 PM, Dan Clark <dan...@microsoft.com> wrote:

Web developers: No signals

I’ve found this documented signal on proposal’s repo https://github.com/tc39/proposal-defer-import-eval/issues/18. It’s important to notice that since it’s from 2023, it predates the `import defer` syntax, but the semantics is the same of current proposal.
In addition to that, on https://2025.stateofjs.com/en-US/features/#js_new_features  it’s the most popular feature that is not in browsers yet other than decorators, and there are some articles and podcasts about it, like https://byteiota.com/typescript-59-import-defer-lazy-imports/ (it talks mostly about TS import defer) and https://youtu.be/_x5f35JVKt8?t=338.


Is there any sign of developer interest we can point to here?

> Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
> No

I'd expect this to be shipping everywhere -- should this say "yes"?

Sorry, I overlooked this. It’s yes.

Dan Clark

unread,
Sep 15, 2026, 12:14:32 PM (8 days ago) Sep 15
to blink-dev, Caio Lima, blink-dev, nrib...@igalia.com, Olivier Flückiger, Dan Clark
Thank you! LGTM1

Mike Taylor

unread,
Sep 15, 2026, 12:16:33 PM (8 days ago) Sep 15
to Dan Clark, blink-dev, Caio Lima, nrib...@igalia.com, Olivier Flückiger

LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6fa4b7b0-2e47-47c8-8017-49409c5de18an%40chromium.org.

Philip Jägenstedt

unread,
Sep 16, 2026, 5:09:38 AM (7 days ago) Sep 16
to Mike Taylor, Dan Clark, blink-dev, Caio Lima, nrib...@igalia.com, Olivier Flückiger
LGTM3

Looks like the tests are at https://wpt.fyi/results/third_party/test262/test/language?label=master&label=experimental&aligned&q=import-defer and still failing because the flag hasn't been flipped yet. If there are test failures after flipping the flag, can you look into getting them to 100%? (Notably, there's one test failing in Safari, will we pass it?)

Nicolò Ribaudo

unread,
Sep 16, 2026, 6:24:58 AM (7 days ago) Sep 16
to blink-dev, Philip Jägenstedt, dan...@microsoft.com, blink-dev, Caio Lima, Nicolò Ribaudo, Olivier Flückiger, mike...@chromium.org
Those tests are run by V8 as they are in the test262 suite, and there are no failures: they would show up as some entries containing "import-defer" at https://source.chromium.org/chromium/chromium/src/+/main:v8/test/test262/test262.status

That specific Safari failure was a test that we added a few weeks ago while fixing the same bug in V8: https://chromium-review.googlesource.com/c/v8/v8/+/8272408

Caio Lima

unread,
Sep 16, 2026, 7:07:13 AM (7 days ago) Sep 16
to Philip Jägenstedt, Mike Taylor, Dan Clark, blink-dev, nrib...@igalia.com, Olivier Flückiger
Thank you very much for reviewing this request.

On Sep 16, 2026, at 6:08 AM, Philip Jägenstedt <foo...@chromium.org> wrote:

LGTM3

Looks like the tests are at https://wpt.fyi/results/third_party/test262/test/language?label=master&label=experimental&aligned&q=import-defer and still failing because the flag hasn't been flipped yet. If there are test failures after flipping the flag, can you look into getting them to 100%? (Notably, there's one test failing in Safari, will we pass it?)

Sure. AFAICT, we are passing all Test262 on current implementation, but if I see any failure, I’ll fix it.

Philip Jägenstedt

unread,
Sep 16, 2026, 7:08:18 AM (7 days ago) Sep 16
to Caio Lima, Mike Taylor, Dan Clark, blink-dev, nrib...@igalia.com, Olivier Flückiger
Den ons 16 sep. 2026 13:06Caio Lima <caio...@igalia.com> skrev:
Thank you very much for reviewing this request.

On Sep 16, 2026, at 6:08 AM, Philip Jägenstedt <foo...@chromium.org> wrote:

LGTM3

Looks like the tests are at https://wpt.fyi/results/third_party/test262/test/language?label=master&label=experimental&aligned&q=import-defer and still failing because the flag hasn't been flipped yet. If there are test failures after flipping the flag, can you look into getting them to 100%? (Notably, there's one test failing in Safari, will we pass it?)

Sure. AFAICT, we are passing all Test262 on current implementation, but if I see any failure, I’ll fix it.


Super, thank you and happy shipping!

Caio Lima

unread,
Sep 16, 2026, 7:12:31 AM (7 days ago) Sep 16
to Philip Jägenstedt, Mike Taylor, Dan Clark, blink-dev, nrib...@igalia.com, Olivier Flückiger
BTW, I uploaded the CL[1] to unflag it, but both Reviewers (Olivier Flückiger and Igor Sheludko) that helped me through the development of the feature are OOO, do you know who else could I ask for review instead?

Reply all
Reply to author
Forward
0 new messages