node/lib/internal/modules/esm
Maya Lekova b09155d975
module: enable existing machinery for deferred import of static modules
This commit enables deferred import for statically imported modules,
by using the corresponding functionality in V8. It adds two tests:
 - smoke test exercising the basic syntax
 - test for deferred import of module with its own imports

More test coverage should be added for mixing ESM and CJS modules,
as well as TypeScript modules.

Refs: https://github.com/tc39/proposal-defer-import-eval
Signed-off-by: Maya Lekova <maya@igalia.com>
PR-URL: https://github.com/nodejs/node/pull/63712
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-06-16 20:39:20 +00:00
..
assert.js
create_dynamic_module.js src: support import() and import.meta in embedder-run modules 2026-02-09 12:31:24 +00:00
get_format.js lib: remove top-level getOptionValue() calls in lib/internal/modules 2026-02-19 12:52:23 +00:00
hooks.js lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
load.js module: fix sync hook short-circuit in require() in imported CJS 2026-05-07 14:44:56 +00:00
loader.js module: load ESM helpers eagerly in the snapshot 2026-05-28 14:22:50 +00:00
module_job.js module: enable existing machinery for deferred import of static modules 2026-06-16 20:39:20 +00:00
module_map.js lib: revert to using default derived class constructors 2025-08-30 14:28:10 +00:00
resolve.js loader: implement package maps 2026-06-12 16:02:01 +00:00
shared_constants.js
translators.js module: fix sync hook short-circuit in require() in imported CJS 2026-05-07 14:44:56 +00:00
utils.js src: support import() and import.meta in embedder-run modules 2026-02-09 12:31:24 +00:00
worker.js esm: fix typo in worker loader hook comment 2026-03-28 17:48:29 +01:00