Skip to content

Commit

Permalink
fix(@ngtools/webpack): provide tsconfig path to ngcc
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 authored and dgp1130 committed Mar 25, 2020
1 parent 9e1e71e commit 7679271
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Expand Up @@ -776,6 +776,7 @@ export class AngularCompilerPlugin {
this._errors,
this._basePath,
this._compilerOptions,
this._tsConfigPath,
);

ngccProcessor.process();
Expand Down
6 changes: 6 additions & 0 deletions packages/ngtools/webpack/src/ngcc_processor.ts
Expand Up @@ -37,6 +37,7 @@ export class NgccProcessor {
private readonly compilationErrors: (Error | string)[],
private readonly basePath: string,
private readonly compilerOptions: ts.CompilerOptions,
private readonly tsConfigPath: string,
) {
this._logger = new NgccLogger(this.compilationWarnings, this.compilationErrors);
this._nodeModulesDirectory = this.findNodeModulesDirectory(this.basePath);
Expand Down Expand Up @@ -82,6 +83,8 @@ export class NgccProcessor {
'--first-only', /** compileAllFormats */
'--create-ivy-entry-points', /** createNewEntryPointFormats */
'--async',
'--tsconfig', /** tsConfigPath */
this.tsConfigPath,
],
{
stdio: ['inherit', process.stderr, process.stderr],
Expand Down Expand Up @@ -127,7 +130,10 @@ export class NgccProcessor {
compileAllFormats: false,
createNewEntryPointFormats: true,
logger: this._logger,
// Path mappings are not longer required since NGCC 9.1
// We keep using them to be backward compatible with NGCC 9.0
pathMappings: this._pathMappings,
tsConfigPath: this.tsConfigPath,
});
timeEnd(timeLabel);

Expand Down

0 comments on commit 7679271

Please sign in to comment.