planning-poker-gwargh/vite.config.js
efim 5ac864f15e not working: attempt to stream in websocket
added Vite proxy, tested with websocat, with direct js websocket.
the error seems to be Laminex related
2023-04-23 22:22:02 +04:00

19 lines
465 B
JavaScript

import { defineConfig } from "vite";
import scalaJSPlugin from "@scala-js/vite-plugin-scalajs";
export default defineConfig({
plugins: [scalaJSPlugin()],
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/, ''),
},
},
},
});