From 32cac37d4fa44d43e7230a7060a0e7587bcbf5f9 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 23 Dec 2021 21:59:26 +0100 Subject: [PATCH] doc: clarify entry point behavior when using loader hooks Fixes: https://github.com/nodejs/node/issues/41275 --- 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..1cb673cedd7058 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 that still follows [CommonJS][] rules. ### Hooks