Open happysalada opened 2 years ago
I have experienced the same thing. @timhall any insight on this?
I took the zip of this great project, extracted the sveltekit example and run into the same issue.
Following proposed fixed, I tried:
import pkg from '@apollo/client/core/core.cjs';
const { InMemoryCache, gql } = pkg;
import { ApolloClient } from '@apollo/client/core/ApolloClient';
without luck, now with error in the apollo module itself .../node_modules/@apollo/client/utilities/globals/fix-graphql.js:1 import { remove } from "ts-invariant/process/index.js";
Adding this to my svelte.config.js
worked:
optimizeDeps: {
exclude: ['@apollo/client', 'svelte-apollo'],
},
ssr: {
noExternal: ['@apollo/client', 'svelte-apollo'],
},
to kit.vite
Hi, thank you for the project!
Upon adding this to an almost brand-new svelte kit project with adapter static, I get the following error
I've tried to check your example svelte-kit to see if there was anything different in the config, but couldn't find anything. I've almost taken verbatim the code you had in your example. this is the relevant part from my index.svelte