Skip to content

Commit

Permalink
doc: update require(ESM) history and stability status
Browse files Browse the repository at this point in the history
PR-URL: nodejs#55199
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
aduh95 committed Oct 4, 2024
1 parent 1de5512 commit ee34b20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ relative, and based on the real path of the files making the calls to

## Loading ECMAScript modules using `require()`

<!-- YAML
added: v22.0.0
-->

> Stability: 1.1 - Active Development. Enable this API with the
> [`--experimental-require-module`][] CLI flag.
The `.mjs` extension is reserved for [ECMAScript Modules][].
Currently, if the flag `--experimental-require-module` is not used, loading
an ECMAScript module using `require()` will throw a [`ERR_REQUIRE_ESM`][]
Expand Down Expand Up @@ -1183,6 +1190,7 @@ This section was moved to
[GLOBAL_FOLDERS]: #loading-from-the-global-folders
[`"main"`]: packages.md#main
[`"type"`]: packages.md#type
[`--experimental-require-module`]: cli.md#--experimental-require-module
[`ERR_REQUIRE_ASYNC_MODULE`]: errors.md#err_require_async_module
[`ERR_REQUIRE_ESM`]: errors.md#err_require_esm
[`ERR_UNSUPPORTED_DIR_IMPORT`]: errors.md#err_unsupported_dir_import
Expand Down

0 comments on commit ee34b20

Please sign in to comment.