Skip to content

Commit fbb97e2

Browse files
authored
fix(client): improve Windows compatibility for Vite dev server
- Add host configuration to allow IP access - Use explicit IP address instead of localhost - Support dynamic server port from environment variables
1 parent 76d4f42 commit fbb97e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ export default defineConfig({
2727
},
2828
},
2929
server: {
30+
host: true,
3031
proxy: {
3132
"/api": {
32-
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
33+
target: `http://127.0.0.1:${process.env.SERVER_PORT || 3000}`,
3334
changeOrigin: true,
3435
rewrite: (path) => path.replace(/^\/api/, ""),
3536
},

0 commit comments

Comments
 (0)