From 6835c81f5a10e2c801f398cf039fa885121d8fcc Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 26 Nov 2024 17:56:38 +0000 Subject: [PATCH] build: add missing path mapping for `build-webpack` import causing lint error I suspect there were some versioning changes with the e.g. `hoist = false` setting in npmrc; so eslint now starts failing about an import from `webpack-server.ts` resulting in unnecessary type cast lint errors. The existing mapping didn't work due to the underscore conversion, so this makes sense, and fixing the path mappings works. --- .../build_angular/src/builders/dev-server/webpack-server.ts | 2 +- tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts b/packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts index ee4b369a89cb..0f1b51b59d80 100644 --- a/packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts +++ b/packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts @@ -263,7 +263,7 @@ export function serveWebpackBrowser( ...buildEvent, baseUrl: serverAddress, stats: generateBuildEventStats(webpackRawStats, browserOptions), - }; + } as DevServerBuilderOutput; }), ); }), diff --git a/tsconfig.json b/tsconfig.json index f8cce3dbe85c..73c91f774209 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,7 @@ "@angular-devkit/schematics/tools": ["./packages/angular_devkit/schematics/tools/index"], "@angular-devkit/schematics/testing": ["./packages/angular_devkit/schematics/testing/index"], "@angular-devkit/architect/testing": ["./packages/angular_devkit/architect/testing/index"], + "@angular-devkit/build-webpack": ["./packages/angular_devkit/build_webpack"], "@angular-devkit/*": ["./packages/angular_devkit/*/src"], "@angular/*": ["./packages/angular/*/src"], "@angular/build/private": ["./packages/angular/build/src/private"],