chore: initial project commit
This commit is contained in:
29
vite.config.ts
Normal file
29
vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), "");
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 4000,
|
||||
proxy: {
|
||||
"/planning-api": {
|
||||
target: env.VITE_PLANNING_API_BASE || "http://localhost:8090",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/planning-api/, "/api"),
|
||||
},
|
||||
"/devops-api": {
|
||||
target: env.VITE_DEVOPS_API_BASE || "http://localhost:8000",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/devops-api/, ""),
|
||||
},
|
||||
"/quality-api": {
|
||||
target: env.VITE_QUALITY_API_BASE || "http://localhost:5000",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/quality-api/, "/api"),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user