jumpstorm/client/vite.config.ts

24 lines
526 B
TypeScript
Raw Normal View History

import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { fileURLToPath, URL } from "node:url";
2023-07-19 23:38:24 -04:00
// https://vitejs.dev/config/
export default defineConfig({
2023-08-23 21:44:59 -04:00
server: {
proxy: {
"/api": {
target: "http://localhost:8080",
ws: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
cors: true,
2023-07-19 23:38:24 -04:00
plugins: [svelte()],
resolve: {
alias: {
"@engine": fileURLToPath(new URL("../engine", import.meta.url)),
},
},
});