Skip to content
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

Support for CommonJS #98

Open
jgeurts opened this issue Mar 13, 2024 · 1 comment
Open

Support for CommonJS #98

jgeurts opened this issue Mar 13, 2024 · 1 comment
Labels
question Further information is requested

Comments

@jgeurts
Copy link

jgeurts commented Mar 13, 2024

Hi,

Unfortunately, the project I am trying to add this to is not an ES module. When prettier is loading the plugin, it is failing with a message similar to:

Invalid configuration file `foo.sql`: require() of ES Module /Users/foobar/dev/helloworld/node_modules/prettier-plugin-embed/dist/index.js from /Users/foobar/dev/helloworld/prettier.config.js not supported.

Is there any way to add cjs output for this library?

@Sec-ant
Copy link
Owner

Sec-ant commented Mar 14, 2024

I'm not sure but I think the plugin resolution is handled by Prettier itself, not the project. So as long as you're using Prettier v3, this plugin should work as expected. Can you provide more information on how you're using Prettier and this plugin?

@Sec-ant Sec-ant added the question Further information is requested label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants