18 lines
458 B
TypeScript
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,
|
|
},
|
|
},
|
|
},
|
|
});
|