@@ -28,8 +28,8 @@ absolute path, it's resolved as a relative path from the current working
28
28
directory. That path is then resolved by [ CommonJS] [ ] module loader. If no
29
29
corresponding file is found, an error is thrown.
30
30
31
- If a file is found, its path will be passed to the [ ECMAScript module loader ] [ ]
32
- under any of the following conditions:
31
+ If a file is found, its path will be passed to the
32
+ [ ES module loader ] [ Modules loaders ] under any of the following conditions:
33
33
34
34
* The program was started with a command-line flag that forces the entry
35
35
point to be loaded with ECMAScript module loader.
@@ -43,9 +43,9 @@ Otherwise, the file is loaded using the CommonJS module loader. See
43
43
44
44
### ECMAScript modules loader entry point caveat
45
45
46
- When loading [ ECMAScript module loader] [ ] loads the program entry point, the ` node `
47
- command will only accept as input only files with ` .js ` , ` .mjs ` , or ` .cjs `
48
- extensions; and with ` .wasm ` extensions when
46
+ When loading, the [ ES module loader] [ Modules loaders ] loads the program
47
+ entry point, the ` node ` command will accept as input only files with ` .js ` ,
48
+ ` .mjs ` , or ` .cjs ` extensions; and with ` .wasm ` extensions when
49
49
[ ` --experimental-wasm-modules ` ] [ ] is enabled.
50
50
51
51
## Options
@@ -396,7 +396,11 @@ changes:
396
396
`--experimental-loader`.
397
397
-->
398
398
399
- Specify the ` module ` of a custom experimental [ ECMAScript module loader] [ ] .
399
+ > This flag is discouraged and may be removed in a future version of Node.js.
400
+ > Please use
401
+ > [ ` --import ` with ` register() ` ] [ module customization hooks: enabling ] instead.
402
+
403
+ Specify the ` module ` containing exported [ module customization hooks] [ ] .
400
404
` module ` may be any string accepted as an [ ` import ` specifier] [ ] .
401
405
402
406
### ` --experimental-network-imports `
@@ -2366,8 +2370,9 @@ done
2366
2370
[ CommonJS module ] : modules.md
2367
2371
[ CustomEvent Web API ] : https://dom.spec.whatwg.org/#customevent
2368
2372
[ ECMAScript module ] : esm.md#modules-ecmascript-modules
2369
- [ ECMAScript module loader ] : esm.md#loaders
2370
2373
[ Fetch API ] : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
2374
+ [ Module customization hooks ] : module.md#customization-hooks
2375
+ [ Module customization hooks: enabling ] : module.md#enabling
2371
2376
[ Modules loaders ] : packages.md#modules-loaders
2372
2377
[ Node.js issue tracker ] : https://github.com/nodejs/node/issues
2373
2378
[ OSSL_PROVIDER-legacy ] : https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html
0 commit comments