import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import 'vant/lib/index.css' // Vant 基础样式，必须引入否则组件无样式

import App from './App.vue'
import router from './router'

if (import.meta.env.VITE_APP_ENV !== 'production') {
  import('vconsole').then(({ default: VConsole }) => new VConsole())
}

const app = createApp(App)
const pinia = createPinia()

pinia.use(piniaPluginPersistedstate)

app.use(pinia)
app.use(router)

app.mount('#app')
