import { createApp } from 'vue' import App from './App.vue' import { createPinia } from "pinia" import 'vant/lib/index.css'; import { isMobile } from '@/plugins'; import { wxShare } from '@/plugins/wxshare'; import VConsole from 'vconsole'; const app = createApp(App) // 定义引入图片地址的全局方法 app.config.globalProperties.imgUrl = (url) => { return new URL(`./assets/images/${url}`, import.meta.url).href } // 初始化我的方法 // app.config.globalProperties.myPlugin = h5plugin // 微信分享配置 wxShare({ title: '分享标题', desc: '分享描述', link: '/index.html' }) // 测试环境开vconsole if (isMobile()) { // const vConsole = new VConsole(); } app.use(createPinia()) app.mount('#app') console.log('Mode:', import.meta.env.VITE_MODE);