fix(vite): silence proxy ECONNRESET and fix react fast refresh export
This commit is contained in:
@@ -44,7 +44,7 @@ export interface LaneTab {
|
|||||||
es_acceso_peatonal?: boolean;
|
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: '' };
|
if (!docRaw) return { documento: '' };
|
||||||
const clean = docRaw.trim().replace(/[\.,\s]/g, '');
|
const clean = docRaw.trim().replace(/[\.,\s]/g, '');
|
||||||
const m = clean.match(/^([FMfm])(\d{5,9})$/);
|
const m = clean.match(/^([FMfm])(\d{5,9})$/);
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ export default defineConfig({
|
|||||||
'/ws': {
|
'/ws': {
|
||||||
target: 'ws://localhost:8000',
|
target: 'ws://localhost:8000',
|
||||||
ws: true,
|
ws: true,
|
||||||
|
rewriteWsOrigin: true,
|
||||||
|
configure: (proxy) => {
|
||||||
|
proxy.on('error', (_err, _req, _res) => {
|
||||||
|
// Silencia errores esperados de socket desconectado / reinicio de servidor
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user