thread-master/old/backend/web/vite.config.ts

32 lines
776 B
TypeScript
Raw Normal View History

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
server: {
host: "0.0.0.0",
port: 5173,
2026-07-07 12:12:04 +00:00
// 支援透過 nginx 網域存取開發伺服器(需反向代理轉發)
allowedHosts: [
"threads-tool.30cm.net",
"threads-tool-dev.30cm.net",
"localhost",
],
// 如果反向代理在 https 並轉發 HMR websocket請視代理設定調整 hmr
// hmr: {
// host: "threads-tool.30cm.net",
// protocol: "wss",
// },
proxy: {
"/api": {
target: "http://127.0.0.1:8890",
changeOrigin: true
2026-07-09 03:45:28 +00:00
},
"/haixun-assets": {
target: "http://127.0.0.1:9000",
changeOrigin: true
}
}
}
});