Skip to content

Commit de2632f

Browse files
committed
feat(@angular-devkit/build-angular): pass logger to ngtools/webpack
1 parent dc2bf08 commit de2632f

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
// TODO: cleanup this file, it's copied as is from Angular CLI.
1010

11-
// tslint:disable-next-line:no-implicit-dependencies
12-
import * as ts from 'typescript';
11+
import { logging } from '@angular-devkit/core';
12+
import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies
1313
import {
1414
AssetPatternObject,
1515
Budget,
@@ -74,6 +74,7 @@ export interface WebpackTestOptions extends BuildOptions {
7474

7575
export interface WebpackConfigOptions<T = BuildOptions> {
7676
root: string;
77+
logger: logging.Logger;
7778
projectRoot: string;
7879
sourceRoot?: string;
7980
buildOptions: T;

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function _createAotPlugin(
8181
nameLazyFiles: buildOptions.namedChunks,
8282
forkTypeChecker: buildOptions.forkTypeChecker,
8383
contextElementDependencyConstructor: require('webpack/lib/dependencies/ContextElementDependency'),
84+
logger: wco.logger,
8485
...options,
8586
};
8687
return new AngularCompilerPlugin(pluginOptions);

packages/angular_devkit/build_angular/src/browser/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export class BrowserBuilder implements Builder<BrowserBuilderSchema> {
132132

133133
wco = {
134134
root: getSystemPath(root),
135+
logger: this.context.logger,
135136
projectRoot: getSystemPath(projectRoot),
136137
buildOptions: options,
137138
tsConfig,

packages/angular_devkit/build_angular/src/extract-i18n/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export class ExtractI18nBuilder implements Builder<ExtractI18nBuilderOptions> {
118118

119119
wco = {
120120
root: getSystemPath(root),
121+
logger: this.context.logger,
121122
projectRoot: getSystemPath(projectRoot),
122123
// TODO: use only this.options, it contains all flags and configs items already.
123124
buildOptions: options,

packages/angular_devkit/build_angular/src/karma/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class KarmaBuilder implements Builder<KarmaBuilderSchema> {
139139

140140
wco = {
141141
root: getSystemPath(root),
142+
logger: this.context.logger,
142143
projectRoot: getSystemPath(projectRoot),
143144
sourceRoot: sourceRoot && getSystemPath(sourceRoot),
144145
// TODO: use only this.options, it contains all flags and configs items already.

packages/angular_devkit/build_angular/src/server/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class ServerBuilder implements Builder<BuildWebpackServerSchema> {
8383

8484
wco = {
8585
root: getSystemPath(root),
86+
logger: this.context.logger,
8687
projectRoot: getSystemPath(projectRoot),
8788
// TODO: use only this.options, it contains all flags and configs items already.
8889
buildOptions: {

0 commit comments

Comments
 (0)