Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,14 @@ Get an Apollo client from the current component's context.
const client = getClient();
</script>
```

Caveat: when using Vite as your bundler and encounter the error `Function called outside component initialization`, you must add `svelte-apollo` to Vite's `optimizeDeps.exclude` configuration property:

```
{
optimizeDeps: {
exclude: ["svelte-apollo"],
}
// other properties
}
```