Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d41b8a

Browse filesBrowse files
committed
doc: update require(ESM) history and stability status
PR-URL: #55199 Backport-PR-URL: #55263 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent b533a51 commit 5d41b8a
Copy full SHA for 5d41b8a

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/modules.md‎

Copy file name to clipboardExpand all lines: doc/api/modules.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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`][]
@@ -1189,6 +1196,7 @@ This section was moved to
11891196
[GLOBAL_FOLDERS]: #loading-from-the-global-folders
11901197
[`"main"`]: packages.md#main
11911198
[`"type"`]: packages.md#type
1199+
[`--experimental-require-module`]: cli.md#--experimental-require-module
11921200
[`ERR_REQUIRE_ASYNC_MODULE`]: errors.md#err_require_async_module
11931201
[`ERR_REQUIRE_ESM`]: errors.md#err_require_esm
11941202
[`ERR_UNSUPPORTED_DIR_IMPORT`]: errors.md#err_unsupported_dir_import

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.