first commit
This commit is contained in:
18
vite.config.ts
Normal file
18
vite.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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/, "")
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user