aboutsummaryrefslogtreecommitdiff
path: root/client/vite.config.ts
diff options
context:
space:
mode:
authorElizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz>2023-08-26 17:57:05 -0600
committerGitHub <noreply@github.com>2023-08-26 17:57:05 -0600
commit8a4ab8d79b5ce1dabb431168398b5d5111fe326c (patch)
treee60767dc5295edf379cf421e20171dc418e548b7 /client/vite.config.ts
parentc6e9baa0009f7cce0f6ff156a3957ef04a8cb684 (diff)
parent6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8 (diff)
downloadjumpstorm-8a4ab8d79b5ce1dabb431168398b5d5111fe326c.tar.gz
jumpstorm-8a4ab8d79b5ce1dabb431168398b5d5111fe326c.zip
Merge pull request #1 from Simponic/network
Network
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))
+ }
+ }
});