From 321ef0302e3a935d824a5f63ac82b2a4130cddcc Mon Sep 17 00:00:00 2001 From: Carlos Tello Date: Thu, 29 Oct 2026 22:40:54 -0300 Subject: [PATCH] fix(vite): silence proxy ECONNRESET and fix react fast refresh export --- frontend/src/views/ControlPostView.tsx | 2 +- frontend/vite.config.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/ControlPostView.tsx b/frontend/src/views/ControlPostView.tsx index 570cffe..9dae3f9 100644 --- a/frontend/src/views/ControlPostView.tsx +++ b/frontend/src/views/ControlPostView.tsx @@ -44,7 +44,7 @@ export interface LaneTab { es_acceso_peatonal?: boolean; } -export const normalizarDniInput = (docRaw: string): { documento: string; sexo?: string } => { +const normalizarDniInput = (docRaw: string): { documento: string; sexo?: string } => { if (!docRaw) return { documento: '' }; const clean = docRaw.trim().replace(/[\.,\s]/g, ''); const m = clean.match(/^([FMfm])(\d{5,9})$/); diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 46879fe..6b636ed 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -20,6 +20,12 @@ export default defineConfig({ '/ws': { target: 'ws://localhost:8000', ws: true, + rewriteWsOrigin: true, + configure: (proxy) => { + proxy.on('error', (_err, _req, _res) => { + // Silencia errores esperados de socket desconectado / reinicio de servidor + }); + }, }, }, },