19 lines
459 B
TypeScript
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/, "")
|
|
},
|
|
},
|
|
},
|
|
});
|