Files
zsw-jx-store/vite.config.ts
2025-11-13 10:16:36 +08:00

19 lines
459 B
TypeScript

import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
export default defineConfig({
plugins: [uni()],
server: {
proxy: {
// 代理头
"/jx": {
//target是代理的目标路径
target: "https://wx.jxc4.com",
changeOrigin: true, //必须要开启跨域
//rewrite 使用正则吧 /jx 替换为 空字符
rewrite: (path) => path.replace(/\/jx/, "")
},
},
},
});