From 0c982b993b69f4a4b52002cc65ad7ba3b0b9d591 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:38:19 -0400 Subject: [PATCH] fix(@angular-devkit/build-angular): avoid repeat error clear in vite development server In the Vite-based development server, an error overlay is requested if a build encounters an error. This error is then cleared when the error is corrected. However, the flag indicating that the error was cleared was not previously reset. This resulted in additional empty update commands being sent to the Vite client. While this has no visual effect, it is unneeded additional processing. (cherry picked from commit 660bb0a85ad3530e0381299efaf94d1d0996f832) --- .../build_angular/src/builders/dev-server/vite-server.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts b/packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts index 7afd7246a1b8..b7558f8f7c9b 100644 --- a/packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts +++ b/packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts @@ -151,6 +151,7 @@ export async function* serveWithVite( } continue; } else if (hadError && server) { + hadError = false; // Send an empty update to clear the error overlay server.ws.send({ 'type': 'update',