import { createApp } from 'vue'
import { createWebHistory } from 'vue-router'
import createRouter from './router'
import App from './App.vue'
import 'normalize.css/normalize.css'  // 重置、初始化css样式的库
import '@/permission'                 // 挂载路由后添加路由拦截器（守卫 ）

// import Loading from 'globalComponents/Loading'
// import Toast from 'globalComponents/Toast'
// Vue.use(Toast)                        //启用全局提示组件
// Vue.use(Loading)                      //使用全局loading组件

if (process.env.NODE_ENV == 'development'){
  require('./mock/index.js');
}

export const vm = createApp(App)
const router = createRouter(createWebHistory())
vm.use(router)
vm.mount('#app')