完成
This commit is contained in:
26
vite.config.ts
Normal file
26
vite.config.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import path from "node:path";
|
||||
|
||||
const statsProxyTarget = process.env.VITE_STATS_PROXY_TARGET || "http://127.0.0.1:3001";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: 6412,
|
||||
strictPort: true,
|
||||
allowedHosts: ["clawborn.staroceanai.cloud"],
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: statsProxyTarget,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user