From f3252689d1c6270ee97b42233372fc0ce08b6e33 Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Thu, 1 Feb 2024 14:57:24 +0100 Subject: [PATCH] fix: watching files with esbuild apps works again on Angular v17.1.0+ --- angular/app-types/angular-app-type/application.dev-server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/angular/app-types/angular-app-type/application.dev-server.ts b/angular/app-types/angular-app-type/application.dev-server.ts index b6c2bf3..319c144 100644 --- a/angular/app-types/angular-app-type/application.dev-server.ts +++ b/angular/app-types/angular-app-type/application.dev-server.ts @@ -54,7 +54,6 @@ export async function serveApplication(options: ServeApplicationOptions): Promis // @ts-ignore only v17+ has 4 arguments, previous versions only have 3 const res = await executeDevServerBuilder(appOptions, builderContext as any, undefined, devServerOptions).toPromise(); - console.log(res); } function getAppOptions(options: ServeApplicationOptions, isSsr: boolean): ApplicationBuilderOptions & DevServerBuilderOptions { @@ -98,6 +97,7 @@ function getAppOptions(options: ServeApplicationOptions, isSsr: boolean): Applic function getBuilderContext(options: ServeApplicationOptions, appOptions: ApplicationBuilderOptions & DevServerBuilderOptions) { const { workspaceRoot } = options; + const builderAbort = new AbortController(); return { id: 1, builder: { @@ -106,6 +106,7 @@ function getBuilderContext(options: ServeApplicationOptions, appOptions: Applica optionSchema: {} }, logger: getLoggerApi(options.logger), + signal: builderAbort.signal, workspaceRoot: workspaceRoot, currentDirectory: '', // doesn't matter, just needs to exist