archy/neode-ui/src/main.ts

23 lines
532 B
TypeScript
Raw Normal View History

2026-01-24 22:59:20 +00:00
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import './style.css'
import App from './App.vue'
import router from './router'
import i18n from './i18n'
import { useToast } from '@/composables/useToast'
2026-01-24 22:59:20 +00:00
const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.use(router)
app.use(i18n)
2026-01-24 22:59:20 +00:00
app.config.errorHandler = (err, _instance, info) => {
console.error('[Vue Error]', err, info)
const { error } = useToast()
error('Something went wrong. Please refresh the page.')
}
2026-01-24 22:59:20 +00:00
app.mount('#app')