diff --git a/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts b/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts index 83ad485f192db..a343ca27ffdaf 100644 --- a/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts +++ b/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts @@ -84,6 +84,12 @@ export function executeWebpackDevServerBuilder( options.tsConfig = tsConfigPath; return options; }; + + // The buildTargetConfiguration also needs to use the generated tsconfig path + // otherwise the build will fail if customWebpack function/file is referencing + // local libs. This synchronize the behavior with webpack-browser and + // webpack-server implementation. + buildTargetConfiguration.tsConfig = tsConfigPath; } return executeDevServerBuilder(options as DevServerBuilderOptions, context, {