import env from 'nenv' import { createHead } from '@unhead/vue' import App from './App.vue' import AppLoading from './AppLoading.vue' import './styles' import { setupPinia } from './modules/pinia' import { setupI18n } from './modules/i18n' import { setupPWA } from './modules/pwa' import { initRouter, setupRouterGuards } from './modules/router/router' // import { setupPrimeVue } from './modules/primevue' import 'virtual:svg-icons-register' { const meta = document.createElement('meta') meta.name = 'naive-ui-style' document.head.appendChild(meta) } { const meta = document.createElement('meta') meta.name = 'vueuc-style' document.head.appendChild(meta) } ; (async () => { // loadingApp const appLoading = createApp(AppLoading) appLoading.mount('#appLoading') const app = createApp(App) // primevue // setupPrimeVue(app) // pinia setupPinia(app) // setup I18n await setupI18n(app) // Router const router = await initRouter(import.meta.env.VITE_BASE_URL) app.use(router) // Router guards await setupRouterGuards() await router.isReady() // pwa if (env.VITE_PWA) { await setupPWA() } const head = createHead() app.use(head) // mount app.mount('#app') // TODO MOCK })()