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 <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Antoine du Hamel authored and Michaël Zasso committed 2022-01-14 16:19:48 +01:00
1 parent 1d75436a1c
commit 014d4836ec
1 file changed
+2 -2
+2 -2
View File
@@ -628,8 +628,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