Files
crewli/apps/app/src/main.ts
bert.hausmans 7660d12a8c feat(primevue): register PrimeVue plugin in main.ts alongside Vuetify
installPrimeVue(app) runs AFTER registerPlugins(app) (which registers
Vuetify + router + Pinia via the Vuexy @core machine). Placing the
PrimeVue install outside @core/utils/plugins is deliberate — it keeps
PrimeVue free of the Vuexy plugin loader so F6 can remove @core/
without disturbing PrimeVue registration.

Both frameworks are now active at runtime. Existing Vuetify pages
continue to render unchanged; PrimeVue components become available
for the layout-shell rewrite (B7) and the FormField wrapper (B5).

Verification:
- pnpm typecheck — clean.
- pnpm build — succeeds in 14.26s, no PrimeVue or theme-related errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 01:02:59 +02:00

46 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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'
import installPrimeVue from '@/plugins/primevue'
// 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)
// PrimeVue runs alongside Vuetify during the F3F6 parallel-mode window.
// Registered AFTER registerPlugins(app) so PrimeVue lives outside the
// Vuexy @core/ machine — F6 can remove @core/ without affecting PrimeVue.
installPrimeVue(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')