19 lines
465 B
JavaScript
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/, ''),
|
|
},
|
|
},
|
|
},
|
|
|
|
});
|