foxygit / RPA-Remisser Log in
commits tags

/webui/frontend/vite.config.ts · 542 B

raw
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// Byggs till ../static (som webui/app.py serverar). npm run dev proxar API-anrop
// till FastAPI-servern (python run_webui.py) på 8765.
export default defineConfig({
  plugins: [react()],
  base: "/",
  build: {
    outDir: "../static",
    emptyOutDir: true,
  },
  server: {
    port: 5173,
    proxy: {
      "/api": "http://127.0.0.1:8765",
      "/wiki": "http://127.0.0.1:8765",
    },
  },
  test: {
    globals: true,
    environment: "node",
  },
});