Skip to content

Commit ee34b20

Browse files
committed
doc: update require(ESM) history and stability status
PR-URL: nodejs#55199 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 1de5512 commit ee34b20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/modules.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ relative, and based on the real path of the files making the calls to
170170

171171
## Loading ECMAScript modules using `require()`
172172

173+
<!-- YAML
174+
added: v22.0.0
175+
-->
176+
177+
> Stability: 1.1 - Active Development. Enable this API with the
178+
> [`--experimental-require-module`][] CLI flag.
179+
173180
The `.mjs` extension is reserved for [ECMAScript Modules][].
174181
Currently, if the flag `--experimental-require-module` is not used, loading
175182
an ECMAScript module using `require()` will throw a [`ERR_REQUIRE_ESM`][]
@@ -1183,6 +1190,7 @@ This section was moved to
11831190
[GLOBAL_FOLDERS]: #loading-from-the-global-folders
11841191
[`"main"`]: packages.md#main
11851192
[`"type"`]: packages.md#type
1193+
[`--experimental-require-module`]: cli.md#--experimental-require-module
11861194
[`ERR_REQUIRE_ASYNC_MODULE`]: errors.md#err_require_async_module
11871195
[`ERR_REQUIRE_ESM`]: errors.md#err_require_esm
11881196
[`ERR_UNSUPPORTED_DIR_IMPORT`]: errors.md#err_unsupported_dir_import

0 commit comments

Comments
 (0)