Revert "Use ESM entrypoint for require(ESM)" (#17156)

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
This commit is contained in:
fisker CheungandTatsunori Uchino authored and GitHub committed 2025-02-22 12:07:28 +08:00
1 parent c98acabc34
commit bf5aab8f2d
4 files changed
+12 -5

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
#### Remove `module-sync` condition (#17156 by @fisker)
In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), so that `require("prettier")` can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove the `module-sync` condition, so `require("prettier")` will still use the CommonJS version, we'll revisit until `require(ESM)` feature is more stable.