-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use this with standalone Prettier API? #678
Comments
As of version 2.6.0, this plugin is now an ECMAScript module, so you cannot |
That throws an error in the build (using the esmify one) with this message: My solution for now has been running the Prettier API in a Node.js server that the web extension can call. It's not ideal, but it at least works. |
I'm writing a web extension that uses Prism and Prettier to format code on a webpage. Since I am using standalone Prettier, I have to add the plugins to the Prettier.format() call directly. The included plugins (typescript, estree, babel, etc.) import fine with require() statements, but I cannot figure out how to do this for the prettier-java-plugin. More info/code samples on my stack-overflow post
The text was updated successfully, but these errors were encountered: