diff --git a/inventory-web/vite.config.ts b/inventory-web/vite.config.ts index 99bf25e..0928950 100644 --- a/inventory-web/vite.config.ts +++ b/inventory-web/vite.config.ts @@ -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 开头的请求