grub/vite.config.ts
2023-08-10 18:37:53 -05:00

18 lines
458 B
TypeScript

import { defineConfig } from "vite";
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react(), wasm(), topLevelAwait()],
server: {
proxy: {
"/ws": {
target: "ws://localhost:3000/ws",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/ws/, ""),
ws: true,
},
},
},
});