-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ESM plugin should be exportable with export default
#9896
Comments
mizdra
added a commit
to mizdra/graphql-codegen-typescript-fabbrica
that referenced
this issue
Mar 10, 2024
- Keep `@mizdra/graphql-codegen-typescript-fabbrica` as CJS because of dotansimha/graphql-code-generator#9896 - Convert `@mizdra/graphql-codegen-typescript-fabbrica` to ESM
mizdra
changed the title
ESM plugin should be default exportable
ESM plugin should be exportable with Mar 10, 2024
export default
Am I understanding this incorrectly? Is it correct behavior that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I want to write a plugin as ESM. But graphql-code-generator cannot load ESM plugin.
Describe the solution you'd like
Allow graphql-code-generator to load ESM plugin like CJS plugin.
Describe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
No response
Workaround
It seems to work if I export the plugin function with named export. However, I think it is better to use the default export.
The text was updated successfully, but these errors were encountered: