chore(vite): configure dev server and exact HMR client port for Docker environment

This commit is contained in:
DXC
2026-04-13 09:03:33 +08:00
parent 14eedaa57a
commit 4728f91cc7

View File

@ -17,10 +17,14 @@ export default defineConfig({
// 允许局域网访问前端页面
host: '0.0.0.0',
port: 5173,
strictPort: true,
watch: {
usePolling: true
},
https: true, // ★ [新增] 强制开启 HTTPS否则浏览器会拦截摄像头
hmr: {
protocol: 'wss',
clientPort: 5173
clientPort: 5175
},
proxy: {
// 拦截所有以 /api 开头的请求