chore(vite): configure dev server and exact HMR client port for Docker environment
This commit is contained in:
@ -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 开头的请求
|
||||
|
||||
Reference in New Issue
Block a user