Ai
1 Star 0 Fork 0

ihu/BigEventAdmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.js 681 Bytes
一键复制 编辑 原始数据 按行查看 历史
ihu 提交于 2025-01-08 20:34 +08:00 . 修复了一些已知问题
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
// 解决跨域
server: {
proxy: {
"/api": {
target: "http://127.0.0.1:8080", // 后端服务器地址
// target: "http://192.168.101.128:8080", // 后端服务器地址
changeOrigin: true, // 是否改变请求域名
rewrite: path => path.replace(/^\/api/, ""), //将原有请求路径中的api替换为''
},
},
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ihwt/big-event-admin.git
git@gitee.com:ihwt/big-event-admin.git
ihwt
big-event-admin
BigEventAdmin
master

搜索帮助