import {defineConfig} from 'vite' import uni from '@dcloudio/vite-plugin-uni' import path from "path"; import AutoImport from 'unplugin-auto-import/vite' // https://vitejs.dev/config/ export default defineConfig(({mode, command}) => { console.log("微信小程序", "开发环境", mode); // 修改这里 console.log(mode, command); return { plugins: [ uni(), AutoImport({ imports: ['vue', 'uni-app'], }) ], resolve: { //配置路径别名 alias: [ { find: '@', replacement: path.resolve(__dirname, './src') }, ] }, // // 微信小程序开发环境专属配置 // server: { // hmr: { // overlay: false // 禁用HMR错误覆盖(小程序开发工具会冲突) // } // } } })