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

ES Modules #10319

Closed
msf-caesar opened this issue Nov 29, 2022 · 2 comments
Closed

ES Modules #10319

msf-caesar opened this issue Nov 29, 2022 · 2 comments

Comments

@msf-caesar
Copy link

I am using Svelte with apollo, everything works fine, the problem is that I have to pass the .cjs to carry out my build and it is not comfortable.

Development:

import { ApolloClient } from '@apollo/client/core';

Production

import { ApolloClient } from '@apollo/client/core/core.cjs';

@alessbell
Copy link
Member

Hi @msf-caesar 👋 Is there a reproduction you can share? If not, can you try importing from @apollo/client/core/index.js and let me know if that helps?

Here's an example from a demo app shared by a community member using Apollo Client + SvelteKit.

@alessbell
Copy link
Member

I'm going to close this out as a duplicate since there is an existing discussion in #8218, but feel free to post additional info in that thread. Thanks!

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

No branches or pull requests

2 participants