Files
test-repo/changelog_unreleased/misc/16958.md
T
2025-01-21 12:17:24 +08:00

6 lines
524 B
Markdown

#### Use ESM entrypoint for `require(ESM)` (#16958 by @tats-u)
Node.js 22.12 or later [can (experimentally) load ESM modules with `require` function](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) without runtime flags. This change enables `require` to load Prettier without the CommonJS entrypoint with almost only the ability to import the ESM entrypoint.
The feature to load ES modules with `require` is not completely stable but can be used without ExperimentalWarning as of Node 22.13.