Skip to content

Commit

Permalink
fix: watching files with esbuild apps works again on Angular v17.1.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Feb 1, 2024
1 parent 97d7e59 commit f325268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion angular/app-types/angular-app-type/application.dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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: {
Expand All @@ -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
Expand Down

0 comments on commit f325268

Please sign in to comment.