@@ -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
@@ -550,7 +550,11 @@ changes:
550
550
`--experimental-loader`.
551
551
-->
552
552
553
- Specify the ` module ` of a custom experimental [ ECMAScript module loader] [ ] .
553
+ > This flag is discouraged and may be removed in a future version of Node.js.
554
+ > Please use
555
+ > [ ` --import ` with ` register() ` ] [ module customization hooks: enabling ] instead.
556
+
557
+ Specify the ` module ` containing exported [ module customization hooks] [ ] .
554
558
` module ` may be any string accepted as an [ ` import ` specifier] [ ] .
555
559
556
560
### ` --experimental-network-imports `
@@ -2640,9 +2644,10 @@ done
2640
2644
[ CommonJS module ] : modules.md
2641
2645
[ CustomEvent Web API ] : https://dom.spec.whatwg.org/#customevent
2642
2646
[ ECMAScript module ] : esm.md#modules-ecmascript-modules
2643
- [ ECMAScript module loader ] : esm.md#loaders
2644
2647
[ Fetch API ] : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
2645
2648
[ File System Permissions ] : permissions.md#file-system-permissions
2649
+ [ Module customization hooks ] : module.md#customization-hooks
2650
+ [ Module customization hooks: enabling ] : module.md#enabling
2646
2651
[ Modules loaders ] : packages.md#modules-loaders
2647
2652
[ Node.js issue tracker ] : https://github.com/nodejs/node/issues
2648
2653
[ OSSL_PROVIDER-legacy ] : https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html
0 commit comments