-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix vitest incompatibility #3674
Conversation
ATM vitest/vite cannot load graphql correctly. I have reported this to vite here: vitejs/vite#7879 I have tested this change with latest vitests and it seems to work correctly with this change. I will be using patch-package with graphql 16 for now, but it would be nice if this could land. Also why was `private: true` set here?
|
I'll revert that change with private then, thanks @n1ru4l |
I also think your PR on v16 will not be accepted because adding an exports map breaks all the people that do "deep imports" today, thus it is considered a breaking change. 😁 Another fun fact is that graphql-js does not work on CodeSandbox frontend templates since v15 was released. |
Sounds about right. It would be best to just revert back to pure CJS without introducing and exports map. |
I should have checked your links before responding :D seems like it is an official package-might be worth adding to the docs. |
ATM vitest/vite cannot load graphql correctly. It always ends up loading both CJS and ESM source in my projects.
I have reported this to vite here: vitejs/vite#7879
but I think a simple change here could resolve the problem. I think using "module" entry point is obsolete/deprecated with node.js.
I have tested this change with latest vitests and it seems to work correctly with this change. I will be using patch-package with graphql 16 for now, but it would be nice if this could land.
Also why was
private: true
set here?