From b4908054d0825c3df77631613090a993d4d5d50b Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 5 Jan 2022 10:54:13 +0100 Subject: [PATCH] doc: clarify entry point behavior when using loader hooks Fixes: https://github.com/nodejs/node/issues/41275 PR-URL: https://github.com/nodejs/node/pull/41304 Reviewed-By: Guy Bedford Reviewed-By: Luigi Pinca --- doc/api/esm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 445b608d9219d8..7d8decd754b79e 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -629,8 +629,8 @@ node b.mjs # works To customize the default module resolution, loader hooks can optionally be provided via a `--experimental-loader ./loader-name.mjs` argument to Node.js. -When hooks are used they only apply to ES module loading and not to any -CommonJS modules loaded. +When hooks are used they apply to the entry point and all `import` calls. They +won't apply to `require` calls; those still follow [CommonJS][] rules. ### Hooks