Define proxy host variable in vite.config.ts

Add a new line to define the proxy host variable.
This commit is contained in:
GuoQing Liu 2025-11-14 23:26:16 +08:00 committed by GitHub
parent 2d99f2e850
commit 779134ed0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@ import react from "@vitejs/plugin-react-swc";
import monacoEditorPlugin from "vite-plugin-monaco-editor"; import monacoEditorPlugin from "vite-plugin-monaco-editor";
const proxyHost = process.env.PROXY_HOST || "localhost:5000"; const proxyHost = process.env.PROXY_HOST || "localhost:5000";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
define: { define: {