30 lines
681 B
TypeScript
30 lines
681 B
TypeScript
import { createApp } from 'vue';
|
|
import { createPinia } from 'pinia';
|
|
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query';
|
|
import App from './App.vue';
|
|
import router from './router';
|
|
import './assets/main.css';
|
|
import { useAuthStore } from './stores/auth';
|
|
|
|
const app = createApp(App);
|
|
const pinia = createPinia();
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 5 * 60 * 1000,
|
|
refetchOnWindowFocus: false
|
|
}
|
|
}
|
|
});
|
|
|
|
const authStore = useAuthStore(pinia);
|
|
authStore.initialize();
|
|
|
|
app.use(pinia);
|
|
app.use(router);
|
|
app.use(VueQueryPlugin, { queryClient });
|
|
|
|
router.isReady().finally(() => {
|
|
app.mount('#app');
|
|
});
|