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

Add ESM export #25

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Add ESM export #25

merged 1 commit into from
Nov 27, 2023

Conversation

DanielleHuisman
Copy link
Contributor

Vite 5 prints warnings for any plugins still using CJS imports. This PR adds an ESM export, which resolves the warning.

Trace: The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
    at warnCjsUsage (/redacted/node_modules/vite/index.cjs:32:3)
    at Object.<anonymous> (/redacted/node_modules/vite/index.cjs:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/redacted/node_modules/vite-plugin-graphql-codegen/dist/index.js:29:20)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)

@danielwaltz
Copy link
Owner

Thanks for this! I saw the warnings but wasn't quite sure what the reason was. This looks good, but it does need to use the conventional commits format in order for CI to detect this as a change to release.

I would say just updating the commit message to fix: support esm would be perfect! I can also take this change and release it myself marking you as a co-contributor if you would prefer.

@DanielleHuisman
Copy link
Contributor Author

I updated the commit message.

@danielwaltz danielwaltz merged commit 0268f47 into danielwaltz:main Nov 27, 2023
2 checks passed
Copy link

🎉 This PR is included in version 3.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants