config: expose vite dev server to lan and configure api proxy

This commit is contained in:
root
2026-06-29 16:14:11 +00:00
parent 78c0c28ff5
commit d122133e93
+13
View File
@@ -4,4 +4,17 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/ws': {
target: 'ws://localhost:8080',
ws: true,
},
},
},
}) })