35 lines
572 B
JavaScript
35 lines
572 B
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
const proxiedPaths = [
|
|
"/health",
|
|
"/doctor",
|
|
"/tasks",
|
|
"/settings",
|
|
"/runtime",
|
|
"/history",
|
|
"/logs",
|
|
"/modules",
|
|
"/scheduler",
|
|
"/worker",
|
|
"/stage",
|
|
];
|
|
|
|
export default defineConfig({
|
|
base: "/ui/",
|
|
plugins: [react()],
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5173,
|
|
proxy: Object.fromEntries(
|
|
proxiedPaths.map((path) => [
|
|
path,
|
|
{
|
|
target: "http://127.0.0.1:8787",
|
|
changeOrigin: false,
|
|
},
|
|
]),
|
|
),
|
|
},
|
|
});
|