27 lines
570 B
TypeScript
27 lines
570 B
TypeScript
|
|
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,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|