Skip to content

Commit 5130faa

Browse files
authored
Update --require docs
1 parent b4280ef commit 5130faa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/api/cli.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,15 +2188,22 @@ native stack and other runtime environment data.
21882188

21892189
<!-- YAML
21902190
added: v1.6.0
2191+
changes:
2192+
- version:
2193+
- v23.0.0
2194+
- v22.12.0
2195+
- v20.19.0
2196+
pr-url: https://github.com/nodejs/node/issues/52697
2197+
description: This option also supports ECMAScript module.
21912198
-->
21922199

21932200
Preload the specified module at startup.
21942201

21952202
Follows `require()`'s module resolution
21962203
rules. `module` may be either a path to a file, or a node module name.
21972204

2198-
Only CommonJS modules are supported.
2199-
Use [`--import`][] to preload an [ECMAScript module][].
2205+
Both CommonJS module and [ECMAScript module][] are supported.
2206+
Use [`--import`][] to preload only [ECMAScript module][].
22002207
Modules preloaded with `--require` will run before modules preloaded with `--import`.
22012208

22022209
Modules are preloaded into the main thread as well as any worker threads,

0 commit comments

Comments
 (0)