From 3f96c9c6502243b06efd4bb34a189e72e3a5557c Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期一, 28 九月 2026 19:24:55 +0800
Subject: [PATCH] 复制项目

---
 frontend/vite.config.ts |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
new file mode 100644
index 0000000..d985240
--- /dev/null
+++ b/frontend/vite.config.ts
@@ -0,0 +1,24 @@
+import { defineConfig } from "vite";

+import react from "@vitejs/plugin-react";

+

+const allowedHosts = ["grader.gps120.com", "localhost", "127.0.0.1"];

+const apiProxy = {

+  "/api": { target: "http://127.0.0.1:8010", changeOrigin: true },

+};

+

+export default defineConfig({

+  plugins: [react()],

+  server: {

+    port: 5175,

+    host: "0.0.0.0",

+    allowedHosts,

+    proxy: apiProxy,

+  },

+  preview: {

+    port: 5174,

+    host: "0.0.0.0",

+    allowedHosts,

+    proxy: apiProxy,

+  },

+});

+
\ No newline at end of file

--
Gitblit v1.8.0