election-game/web/vite.config.ts

16 lines
468 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
server: {
// 聽所有網路介面:同一個 Wi-Fi 的手機、平板可以用這台電腦的 IP 連進來試玩
host: "0.0.0.0",
// 遊戲 API(backend/apps/server,pnpm --filter @election2026/server start)
proxy: { "/api": "http://127.0.0.1:8787" },
},
test: {
include: ["test/**/*.test.ts"],
},
});