doc: update require(ESM)
history and stability status
PR-URL: https://github.com/nodejs/node/pull/55199 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
1d5ed725e9
commit
348d865652
@ -171,15 +171,20 @@ relative, and based on the real path of the files making the calls to
|
|||||||
## Loading ECMAScript modules using `require()`
|
## Loading ECMAScript modules using `require()`
|
||||||
|
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
|
added:
|
||||||
|
- v22.0.0
|
||||||
|
- v20.17.0
|
||||||
changes:
|
changes:
|
||||||
- version: REPLACEME
|
- version: REPLACEME
|
||||||
pr-url: https://github.com/nodejs/node/pull/55085
|
pr-url: https://github.com/nodejs/node/pull/55085
|
||||||
description: require() now supports loading synchronous ES modules by default.
|
description: This feature is no longer behind the `--experimental-require-module` CLI flag.
|
||||||
- version: REPLACEME
|
- version: REPLACEME
|
||||||
pr-url: https://github.com/nodejs/node/pull/54563
|
pr-url: https://github.com/nodejs/node/pull/54563
|
||||||
description: Support `'module.exports'` interop export in `require(esm)`.
|
description: Support `'module.exports'` interop export in `require(esm)`.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
> Stability: 1.2 - Release candidate
|
||||||
|
|
||||||
The `.mjs` extension is reserved for [ECMAScript Modules][].
|
The `.mjs` extension is reserved for [ECMAScript Modules][].
|
||||||
See [Determining module system][] section for more info
|
See [Determining module system][] section for more info
|
||||||
regarding which files are parsed as ECMAScript modules.
|
regarding which files are parsed as ECMAScript modules.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user