import { createApp } from 'vue'
import App from './App.vue'
import router, {initMainRouter} from './router'
import store from "./store"
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'animate.css';
import './style/index.scss'
import 'virtual:svg-icons-register'    // 【svg-icons相关】
import initComponent from '@/plugins/initComponent'
import initProperties from '@/plugins/initProperties'
import repeatFileValid from '@/plugins/repeatFileValid'
import initDirect from '@/plugins/initDirect'
import 'default-passive-events'
import gitInfo from '@/out/git_info.json'

repeatFileValid()
await initMainRouter()  //  路由挂载前初始化路由表
const app = createApp(App)
await initProperties(app)
initComponent(app)
app.use(initDirect)
app.use(router)
app.use(store)
app.use(ElementPlus)
app.mount('#app')
// 设置为 true 以在浏览器开发工具的 performance/timeline 面板中启用对组件初始化、编译、渲染和更新的性能追踪。
app.config.performance = true

try {
  // @ts-ignore
  window.git = gitInfo
} catch (e) {
}
