Open History to see the last commit
1import 'vue-sonner/style.css'
2import { persistQueryClient } from '@tanstack/query-persist-client-core'
3import { VueQueryPlugin } from '@tanstack/vue-query'
4import { createApp } from 'vue'
5import App from './App.vue'
6import { worker } from './mocks'
7import { persister, queryClient } from './queryClient'
8β
9worker.start().then(() => {
10 createApp(App)
11 .use(VueQueryPlugin, {
12 queryClient,
13 clientPersister: (client) =>
14 persistQueryClient({ queryClient: client, persister }),
15 clientPersisterOnSuccess: (client) => {
16 // resume mutations after initial restore from localStorage was successful
17 client.resumePausedMutations().then(() => {
18 client.invalidateQueries()
19 })
20 },
21 })
22 .mount('#app')
23})