From 9833dc606019a74b52fc9cbbed7ee0912f010edd Mon Sep 17 00:00:00 2001 From: Nam Yooseong <102887277+meteorqz6@users.noreply.github.com> Date: Fri, 12 Sep 2025 15:40:24 +0900 Subject: [PATCH] doc: rephrase dynamic import() description The description is updated to clarify that dynamic import() is asynchronous, dynamic, and works in both CJS and ESM contexts. The new phrasing also avoids implying it is the only method for loading ES modules in CommonJS. Fixes: https://github.com/nodejs/node/issues/59077 PR-URL: https://github.com/nodejs/node/pull/59224 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina --- doc/api/esm.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index accf7830d91..91bdf8d2d7c 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -331,8 +331,9 @@ fs.readFileSync === readFileSync; ## `import()` expressions -[Dynamic `import()`][] is supported in both CommonJS and ES modules. In CommonJS -modules it can be used to load ES modules. +[Dynamic `import()`][] provides an asynchronous way to import modules. It is +supported in both CommonJS and ES modules, and can be used to load both CommonJS +and ES modules. ## `import.meta`