19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
import { defineConfig } from "vite";
|
|
import uni from "@dcloudio/vite-plugin-uni";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [uni()],
|
|
server: {
|
|
proxy: {
|
|
// 用 '/api' 开头的路径,指向配置的目标地址
|
|
"/api": {
|
|
target: "http://192.168.0.14:18080/zhgd",
|
|
// target: "http://10.40.92.32:18080/zhgd",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
});
|