import { createApp } from 'vue' import { VueQueryPlugin } from '@tanstack/vue-query' import { queryClientConfig } from '@/lib/query-client' import { initSentry, installContextBinding } from '@/observability' import { router } from '@/plugins/1.router' import App from '@/App.vue' import { registerPlugins } from '@core/utils/plugins' // Styles import '@styles/tailwind.css' import '@core/scss/template/index.scss' import '@styles/styles.scss' // Create vue app const app = createApp(App) // RFC-WS-7 — Sentry init runs before plugin registration so the SDK can // hook Vue's errorHandler before any plugin or component initialises. // Empty DSN = SDK no-op (mirrors backend behaviour, RFC §3.3). initSentry({ app, router, dsn: import.meta.env.VITE_SENTRY_DSN_FRONTEND ?? '', release: import.meta.env.VITE_SENTRY_RELEASE ?? '', environment: import.meta.env.MODE, }) // Register plugins (router, pinia, vuetify, …). registerPlugins(app) // Bind auth-scope tags per route navigation. Must run after pinia is set // up by registerPlugins (the guard reads useAuthStore / useOrganisationStore). installContextBinding(router) app.use(VueQueryPlugin, queryClientConfig) // Mount vue app app.mount('#app')