-
Notifications
You must be signed in to change notification settings - Fork 311
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
Missing default
or module-sync
export in package.json
#1245
Comments
@SimpleCreations Awesome, I also recently heard about this but just vaguely. I'll make a release with the changes you're indicating. Do you know which Node.js version users need for this to work? |
Hi @jasonkuhrt, thank you for quick reply!
The change I'm proposing would be backwards compatible of course. |
What is the benefit of module-sync? When we ship this I'll update our docs for users who don't know |
Note you're asking about |
I also updated |
Hi @jasonkuhrt! Thank you for the changes — I've tested the update, it works great now! Also glad you removed unnecessary dependencies. |
Thanks for brining this approach to my attention! |
Description
Latest Node.js now supports
require
ing pure ESM packages, which is great for all of us who are stuck with CJS due to other dependencies and want to use 7.x.However,
graphql-request
'sexports
field in package.json is too restrictive — it insists on the package being imported via ESM syntax, while in reality it otherwise would work if imported viarequire(esm)
.graffle/package.json
Lines 9 to 15 in ccdae10
Please consider adding an additional
default
ormodule-sync
export, or removingimport
specifier altogether, e.g.This is done by other pure ESM packages (for example
nanoid
).Reproduction Steps/Repo Link
In Node 23:
The text was updated successfully, but these errors were encountered: