diff --git a/doc/api/cli.md b/doc/api/cli.md index 7c95014395f6f8..2676a96cb6387a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -898,7 +898,9 @@ changes: > [`--import` with `register()`][module customization hooks: enabling] instead. Specify the `module` containing exported [module customization hooks][]. -`module` may be any string accepted as an [`import` specifier][]. +`module` may be any string accepted as an [`import` specifier][]. This option +has no effect on worker threads. Worker threads inherit the customization hooks +chain configured on main thread. ### `--experimental-network-imports` diff --git a/doc/api/module.md b/doc/api/module.md index b62cb55a094f59..3bafb71de734b2 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -113,7 +113,9 @@ changes: `initialize` hook. Register a module that exports [hooks][] that customize Node.js module -resolution and loading behavior. See [Customization hooks][]. +resolution and loading behavior. Registering modules that export [hooks][] only +has an effect on the main thread. All worker threads inherit the customization +hooks chain of the main thread. See [Customization hooks][]. ### `module.syncBuiltinESMExports()` diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index e4e842c6d21365..2fcfb0f89478d5 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -1008,7 +1008,10 @@ changes: * `execArgv` {string\[]} List of node CLI options passed to the worker. V8 options (such as `--max-old-space-size`) and options that affect the process (such as `--title`) are not supported. If set, this is provided - as [`process.execArgv`][] inside the worker. By default, options are + as [`process.execArgv`][] inside the worker. `--experimental-loader` + and `--import` with `module.register()` calls to contribute to the hooks + chain do not have an effect on the worker threads. These options affect + only the configuration of the main thread. By default, options are inherited from the parent thread. * `stdin` {boolean} If this is set to `true`, then `worker.stdin` provides a writable stream whose contents appear as `process.stdin`