import { defineConfig } from "vite";
import preact from "@preact/preset-vite";

const backendUrl = process.env.VITE_BACKEND_URL || "http://localhost:8000";

export default defineConfig({
  plugins: [preact()],
  server: {
    proxy: {
      "/rtc": backendUrl,
      "/health": backendUrl,
    },
  },
  build: {
    outDir: "dist",
    emptyOutDir: true,
  },
});
