import { defineConfig } from "vite"; import scalaJSPlugin from "@scala-js/vite-plugin-scalajs"; export default defineConfig({ plugins: [scalaJSPlugin({ projectID: 'frontend', })], server: { proxy: { // Proxy all requests starting with /api to your backend server '/api': { target: 'http://localhost:8080', changeOrigin: true, ws: true, // Enable WebSocket proxying rewrite: (path) => path.replace(/^\/api/, ''), }, }, }, });