From 5c07095ba7a25362085b1b5434e93d8a02f523c0 Mon Sep 17 00:00:00 2001 From: Aral Roca Date: Thu, 28 Nov 2024 22:57:18 +0100 Subject: [PATCH] fix(dx): fix bad milliseconds feedback during hotreload --- packages/brisa/src/cli/dev-live-reload.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/brisa/src/cli/dev-live-reload.tsx b/packages/brisa/src/cli/dev-live-reload.tsx index 86a28ae3..e7c53f4e 100644 --- a/packages/brisa/src/cli/dev-live-reload.tsx +++ b/packages/brisa/src/cli/dev-live-reload.tsx @@ -66,9 +66,6 @@ export async function activateHotReload() { }, ); - const nsEnd = nanoseconds(); - const ms = ((nsEnd - nsStart) / 1000000).toFixed(2); - currentProcess.on('error', (error: any) => { console.log( LOG_PREFIX.ERROR, @@ -80,6 +77,9 @@ export async function activateHotReload() { currentProcess.on('exit', async (code: number) => { if (code !== 0) return; + const nsEnd = nanoseconds(); + const ms = ((nsEnd - nsStart) / 1000000).toFixed(2); + console.log(LOG_PREFIX.READY, `recompiled ${filename} in ${ms}ms`); if (!globalThis.brisaServer) return;