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

Doesn't work with Vite 3 , Apollo shipping wrong ESM entries #9834

Closed
brillout opened this issue Jun 18, 2022 · 9 comments
Closed

Doesn't work with Vite 3 , Apollo shipping wrong ESM entries #9834

brillout opened this issue Jun 18, 2022 · 9 comments
Assignees
Labels

Comments

@brillout
Copy link
Contributor

Because of an ESM compatibility problem. Note that a lot of libraries do work with Vite 3, so I'm leaning towards thinking that it's an issue on Apollo GraphQL's side.

Reproduction: https://github.com/brillout/graphql-apollo_vite-3_bug-2.

(I didn't manage to make a more minimal reproduction because of #9833.)

@jpvajda
Copy link
Contributor

jpvajda commented Jun 23, 2022

@brillout Since this is tracked in #8190 how would you feel about me closing this out for now?

@brillout
Copy link
Contributor Author

Sure.

@brillout
Copy link
Contributor Author

Actually, this one is not related to #8190. This bug seems to be about apollo shipping wrong ESM entries. See https://github.com/brillout/graphql-apollo_vite-3_bug-2.

This may very well break all vite-plugin-ssr Apollo GraphQL users who will want to switch from Vite 2 to Vite 3.

@jpvajda
Copy link
Contributor

jpvajda commented Jun 23, 2022

@brillout Thanks for clarifying, I'll reopen this issue and clarify the title a bit.

@jpvajda jpvajda reopened this Jun 23, 2022
@jpvajda jpvajda changed the title Doesn't work with Vite 3 (2) Doesn't work with Vite 3 , Apollo shipping wrong ESM entries Jun 23, 2022
@williamrjribeiro
Copy link

Hello. Any updates on this issue or any idea if a fix is planned for v3 or just v4 of Apollo Client? I'm looking forward to upgrading to Vite 3 on my projects that use Apollo Client. 😃

@alessbell
Copy link
Member

Hi @brillout 👋 thanks for following up here. I took a look at https://github.com/brillout/graphql-apollo_vite-3_bug-2 but was seeing some unrelated errors regarding @vue/apollo-composable imports.

In search of a more minimal reproduction, I found the excellent examples in your vite-plugin-ssr repo :) I was able to get examples/graphql-apollo-react running with Vite v3 with minimal changes and opened a PR here: vikejs/vike#369

As you know, this example imports from @apollo/client on both the client and server. As far as I can see,@apollo/client is compatible with Vite v3, but please let me know if you have any other concerns. Thanks!

@jpvajda jpvajda removed the 🔍 investigate Investigate further label Jul 20, 2022
@jpvajda jpvajda added the 🏓 awaiting-contributor-response requires input from a contributor label Jul 20, 2022
@brillout
Copy link
Contributor Author

Thanks for the PR! Let's see if the test suites goes green and, if yes, then we can close this 👌.

@brillout
Copy link
Contributor Author

vite-plugin-ssr's Apollo test suites are green again 🟢.

@alessbell
Copy link
Member

Just saw you merged the PR @brillout, thanks for your help here!

@jpvajda jpvajda removed the 🏓 awaiting-contributor-response requires input from a contributor label Jul 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants