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: #55199
Backport-PR-URL: #55265
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 authored and marco-ippolito committed Nov 16, 2024
1 parent 6b3c24d commit 70504f8
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: v20.17.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 @@ -1153,6 +1160,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 70504f8

Please sign in to comment.