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. |
|
To be discussed at Thursday June 25 5pm UTC meeting https://github.com/graphql/graphql-js-wg/blob/main/agendas/2025/06-Jun/25-graphql-js-wg-june-2025.md We invite everyone to consider joining if you are able! |
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: trueset here?