openstellaris/frontend/vite.config.ts

19 lines
499 B
TypeScript

import { defineConfig } from "vite";
import reactPlugin from "@vitejs/plugin-react-swc";
import wasmPlugin from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactPlugin(), wasmPlugin(), topLevelAwait()],
server: {
proxy: {
"/api": {
target: "http://localhost:1440",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
});