Files
DataGovernanceDashboard/next/vite.config.ts
T
2026-07-28 21:38:48 +08:00

28 lines
697 B
TypeScript

/**
* Vite 开发与构建配置。
* 开发环境将同源 /qhse_webapi 请求转发到正式接口域名,token 由浏览器请求统一携带。
*/
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) }
},
base: "./",
server: {
port: 18081,
proxy: {
"/qhse_webapi": {
target: "https://qhse.cncecoa.com",
changeOrigin: true,
secure: true,
timeout: 15000,
proxyTimeout: 15000
}
}
}
});