524 B
524 B
Use ESM entrypoint for require(ESM) (#16958 by @tats-u)
Node.js 22.12 or later can (experimentally) load ESM modules with require function 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.