GPU_Web/vite.config.ts
Leo_Ding 553b76cd3b 11
2025-12-02 15:14:07 +08:00

27 lines
603 B
TypeScript

// vite.config.js
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
import path from "path";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
server: {
port: 8080, // 设置开发服务器端口为 8080
host: true,
open: true, // 可选:启动时自动打开浏览器
proxy: {
"/v1": {
target: "http://10.10.1.27:8888",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1/, '')
}
}
},
});