Files
DataGovernanceDashboard/next/vite.config.ts
T

28 lines
697 B
TypeScript
Raw Normal View History

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