summaryrefslogtreecommitdiff
path: root/client/vite.config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/vite.config.ts')
-rw-r--r--client/vite.config.ts23
1 files changed, 17 insertions, 6 deletions
diff --git a/client/vite.config.ts b/client/vite.config.ts
index 0307338..6f0e1d0 100644
--- a/client/vite.config.ts
+++ b/client/vite.config.ts
@@ -1,13 +1,24 @@
-import { defineConfig } from "vite";
-import { svelte } from "@sveltejs/vite-plugin-svelte";
-import { fileURLToPath, URL } from "node:url";
+import { defineConfig } from 'vite';
+import { svelte } from '@sveltejs/vite-plugin-svelte';
+import { fileURLToPath, URL } from 'node:url';
// https://vitejs.dev/config/
export default defineConfig({
+ server: {
+ host: '0.0.0.0',
+ proxy: {
+ '/api': {
+ target: 'http://10.0.0.237:8080',
+ ws: true,
+ rewrite: (path) => path.replace(/^\/api/, '')
+ }
+ }
+ },
+ cors: true,
plugins: [svelte()],
resolve: {
alias: {
- "@engine": fileURLToPath(new URL("../engine", import.meta.url)),
- },
- },
+ '@engine': fileURLToPath(new URL('../engine', import.meta.url))
+ }
+ }
});