diff --git a/packages/vue-query/src/vueQueryPlugin.ts b/packages/vue-query/src/vueQueryPlugin.ts index 5d5478791f..5eb5cf522b 100644 --- a/packages/vue-query/src/vueQueryPlugin.ts +++ b/packages/vue-query/src/vueQueryPlugin.ts @@ -1,4 +1,5 @@ import { isVue2 } from 'vue-demi' +import { isServer } from '@tanstack/query-core' import type { QueryClientConfig } from '@tanstack/query-core' import { QueryClient } from './queryClient' @@ -56,7 +57,10 @@ export const VueQueryPlugin = { } } - client.mount() + if (!isServer) { + client.mount() + } + let persisterUnmount = () => { // noop }