2023-12-29 22:36:27 +00:00
|
|
|
import { defineConfig } from "vite";
|
2024-01-01 03:38:14 +00:00
|
|
|
import reactPlugin from "@vitejs/plugin-react-swc";
|
|
|
|
import wasmPlugin from "vite-plugin-wasm";
|
|
|
|
import topLevelAwait from "vite-plugin-top-level-await";
|
2023-12-29 22:36:27 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2024-01-01 03:38:14 +00:00
|
|
|
plugins: [reactPlugin(), wasmPlugin(), topLevelAwait()],
|
2023-12-29 22:36:27 +00:00
|
|
|
server: {
|
|
|
|
proxy: {
|
|
|
|
"/api": {
|
|
|
|
target: "http://localhost:1440",
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|