Skip to content

Commit 00bf306

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@ngtools/webpack): provide tsconfig path to ngcc
1 parent 23ce89d commit 00bf306

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ export class AngularCompilerPlugin {
776776
this._errors,
777777
this._basePath,
778778
this._compilerOptions,
779+
this._tsConfigPath,
779780
);
780781

781782
ngccProcessor.process();

packages/ngtools/webpack/src/ngcc_processor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class NgccProcessor {
3737
private readonly compilationErrors: (Error | string)[],
3838
private readonly basePath: string,
3939
private readonly compilerOptions: ts.CompilerOptions,
40+
private readonly tsConfigPath: string,
4041
) {
4142
this._logger = new NgccLogger(this.compilationWarnings, this.compilationErrors);
4243
this._nodeModulesDirectory = this.findNodeModulesDirectory(this.basePath);
@@ -82,6 +83,8 @@ export class NgccProcessor {
8283
'--first-only', /** compileAllFormats */
8384
'--create-ivy-entry-points', /** createNewEntryPointFormats */
8485
'--async',
86+
'--tsconfig', /** tsConfigPath */
87+
this.tsConfigPath,
8588
],
8689
{
8790
stdio: ['inherit', process.stderr, process.stderr],
@@ -127,7 +130,10 @@ export class NgccProcessor {
127130
compileAllFormats: false,
128131
createNewEntryPointFormats: true,
129132
logger: this._logger,
133+
// Path mappings are not longer required since NGCC 9.1
134+
// We keep using them to be backward compatible with NGCC 9.0
130135
pathMappings: this._pathMappings,
136+
tsConfigPath: this.tsConfigPath,
131137
});
132138
timeEnd(timeLabel);
133139

0 commit comments

Comments
 (0)