I'd like to use Apollo Client 3 in my Svelte project. When migrating over from 2.6, I noticed I needed react as a dependency to run my project.
ERROR in ./node_modules/@apollo/client/react/react.js
Module not found: Error: Can't resolve 'react' in '/Users/kierangilliam/Documents/git/project/client/node_modules/@apollo/client/react'
@ ./node_modules/@apollo/client/react/react.js 3:29-45
@ ./node_modules/@apollo/client/react/hooks/useMutation.js
@ ./node_modules/@apollo/client/index.js
@ ./src-ui/lib/user.ts
@ ./src-ui/views/Setup.svelte
@ ./src-ui/Index.svelte
@ ./src-ui/index.js
@ multi ./src-ui/index.js
Is there a way around this without adding react as a dependency?
@kierangilliam Use @apollo/client/core instead of @apollo/client.
Most helpful comment
@kierangilliam Use
@apollo/client/coreinstead of@apollo/client.