feat: add Vite dev server proxy configuration for local development

Enable concurrent web development workflow with Vite HMR instead of requiring pre-build. Configure Vite server to listen on 0.0.0.0 for LAN access, proxy /api and /socket.io to backend (127.0.0.1:3006), and run dev:server and dev:web together.
This commit is contained in:
weishu
2025-12-19 11:43:11 +08:00
parent 7da8144ff6
commit 24d5056169
3 changed files with 66 additions and 7 deletions
+2
View File
@@ -3,6 +3,7 @@
"private": true,
"workspaces": ["cli", "server", "web"],
"scripts": {
"dev": "concurrently \"bun run dev:server\" \"bun run dev:web\" --kill-others-on-exit",
"build": "bun run build:cli && bun run build:server && bun run build:web",
"build:cli": "cd cli && bun run build",
"build:server": "cd server && bun run build",
@@ -16,6 +17,7 @@
"test": "cd cli && bun run test"
},
"devDependencies": {
"concurrently": "^9.2.1",
"vite-plugin-pwa": "^1.2.0",
"workbox-window": "^7.4.0"
}