Vite needs to import @apollo/client/index.js
instead of @apollo/client
#9264
Unanswered
mahmoudmoravej
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started migrating from classic template to Vite, but I got these errors although the Apollo/Client package exports ESM too:
and
As https://github.com/apollographql/apollo-client/issues/9976#issuecomment-1768446694"@apollo/client/index.js" Adding
/index.js
to the end of the graphql imports solved the issue(why?)But it is not a permanent fix as I have used
graphql-codegen
and running codegen again needs manual fixes. any permanent fix?Beta Was this translation helpful? Give feedback.
All reactions