import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; // https://vitejs.dev/config/ export default defineConfig({ server: { host: '0.0.0.0', // 解决“vite use `--host` to expose”-- 0.0.0.0 将监听所有地址 proxy: { // '/api': { // target: 'https://qqzso.ydool.com/',//马顺华 // changeOrigin: true, // }, '/srv': { target: 'http://192.168.1.98:10001/',//沈涛 changeOrigin: true, }, } }, base: "./", //生产环境路径 plugins: [vue()], resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), }, }, });