30 lines
700 B
JavaScript
30 lines
700 B
JavaScript
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://36.140.118.172:88',//沈涛
|
|
changeOrigin: true,
|
|
},
|
|
|
|
}
|
|
},
|
|
base: "./", //生产环境路径
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
});
|