/// <reference types="vitest/config" />
import { defineConfig } from "@solidjs/start/config";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
  ssr: false,
  vite: {
    plugins: [tailwindcss()],
    server: {
      proxy: {
        "/api": {
          target: "http://localhost:9100",
          changeOrigin: true,
          secure: false,
          ws: true,
          configureProxy: (proxy: any) => {
            proxy.on("proxyReq", (proxyReq: any, req: any) => {
              // Forward cookies and auth headers
              const cookie = req.headers.cookie;
              if (cookie) {
                proxyReq.setHeader("Cookie", cookie);
              }
            });
          },
        },
      },
    },
  },
});
