@@ -28,8 +28,9 @@ 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
+ [ ECMAScript module loader] [ Modules loaders ] under any of the following
33
+ conditions:
33
34
34
35
* The program was started with a command-line flag that forces the entry
35
36
point to be loaded with ECMAScript module loader.
@@ -43,9 +44,9 @@ Otherwise, the file is loaded using the CommonJS module loader. See
43
44
44
45
### ECMAScript modules loader entry point caveat
45
46
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
47
+ When loading [ ECMAScript module loader] [ Modules loaders ] loads the program
48
+ entry point, the ` node ` command will only accept as input only files with
49
+ ` .js ` , ` .mjs ` , or ` .cjs ` extensions; and with ` .wasm ` extensions when
49
50
[ ` --experimental-wasm-modules ` ] [ ] is enabled.
50
51
51
52
## Options
@@ -550,7 +551,11 @@ changes:
550
551
`--experimental-loader`.
551
552
-->
552
553
553
- Specify the ` module ` of a custom experimental [ ECMAScript module loader] [ ] .
554
+ > This flag is discouraged and may be removed in a future version of Node.js.
555
+ > Please use
556
+ > [ ` --import ` with ` register() ` ] [ module customization hooks: enabling ] instead.
557
+
558
+ Specify the ` module ` containing exported [ module customization hooks] [ ] .
554
559
` module ` may be any string accepted as an [ ` import ` specifier] [ ] .
555
560
556
561
### ` --experimental-network-imports `
@@ -2644,9 +2649,10 @@ done
2644
2649
[ CommonJS module ] : modules.md
2645
2650
[ CustomEvent Web API ] : https://dom.spec.whatwg.org/#customevent
2646
2651
[ ECMAScript module ] : esm.md#modules-ecmascript-modules
2647
- [ ECMAScript module loader ] : esm.md#loaders
2648
2652
[ Fetch API ] : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
2649
2653
[ File System Permissions ] : permissions.md#file-system-permissions
2654
+ [ Module customization hooks ] : module.md#customization-hooks
2655
+ [ Module customization hooks: enabling ] : module.md#enabling
2650
2656
[ Modules loaders ] : packages.md#modules-loaders
2651
2657
[ Node.js issue tracker ] : https://github.com/nodejs/node/issues
2652
2658
[ OSSL_PROVIDER-legacy ] : https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html
0 commit comments