init biliup-next
This commit is contained in:
34
frontend/vite.config.mjs
Normal file
34
frontend/vite.config.mjs
Normal file
@ -0,0 +1,34 @@
|
||||
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,
|
||||
},
|
||||
]),
|
||||
),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user