497 B
497 B
[BREAKING] Support plugins in ESM (#13201 by @fisker)
Since v3.0.0, we load plugins via import() instead of require(), plugins can be ESM modules now.
If you use --plugin by directory path, or file path without extensions, the plugin may not able to load.
- prettier . --plugin=path/to/my-plugin-directory
+ prettier . --plugin=path/to/my-plugin-directory/index.js
- prettier . --plugin=path/to/my-plugin-file
+ prettier . --plugin=path/to/my-plugin-file.js