mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-10 11:42:27 +08:00
Initial commit
This commit is contained in:
26
frontend/src/main.ts
Normal file
26
frontend/src/main.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import router from './router'
|
||||
import './style.css'
|
||||
import App from './App.vue'
|
||||
import { preloadCriticalModules } from './utils/importRetry'
|
||||
|
||||
const app = createApp(App)
|
||||
const pinia = createPinia()
|
||||
|
||||
app.use(pinia)
|
||||
app.use(router)
|
||||
|
||||
// 预加载关键模块
|
||||
preloadCriticalModules()
|
||||
|
||||
// 全局错误处理器 - 只在开发环境下记录详细日志
|
||||
app.config.errorHandler = (err: any, instance, info) => {
|
||||
if (import.meta.env.DEV) {
|
||||
console.error('Global error handler:', err, info)
|
||||
}
|
||||
|
||||
// 模块加载错误处理已移至 App.vue 的统一处理器中
|
||||
}
|
||||
|
||||
app.mount('#app')
|
||||
Reference in New Issue
Block a user