Skip to content

Commit ab70e61

Browse files
filipesilvavikerman
authored andcommitted
1 parent cda57ae commit ab70e61

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class AngularCompilerPlugin {
9191
// TS compilation.
9292
private _compilerOptions: CompilerOptions;
9393
private _rootNames: string[];
94-
private _program: (ts.Program | Program) | null;
94+
private _program: (ts.Program | Program) | undefined;
9595
private _compilerHost: WebpackCompilerHost & CompilerHost;
9696
private _moduleResolutionCache: ts.ModuleResolutionCache;
9797
private _resourceLoader?: WebpackResourceLoader;
@@ -673,7 +673,7 @@ export class AngularCompilerPlugin {
673673
// only present for webpack 4.23.0+, assume true otherwise
674674
const watchMode = rootCompiler.watchMode === undefined ? true : rootCompiler.watchMode;
675675
if (!watchMode) {
676-
this._program = null;
676+
this._program = undefined;
677677
this._transformers = [];
678678
this._resourceLoader = undefined;
679679
this._compilerHost.reset();
@@ -1385,7 +1385,7 @@ export class AngularCompilerPlugin {
13851385
} else {
13861386
errMsg = e.stack;
13871387
// It is not a syntax error we might have a program with unknown state, discard it.
1388-
this._program = null;
1388+
this._program = undefined;
13891389
code = UNKNOWN_ERROR_CODE;
13901390
}
13911391
allDiagnostics.push(

tests/angular_devkit/build_webpack/angular-app/tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
]
1919
},
2020
"angularCompilerOptions": {
21-
// TODO: debug this problem.
22-
// This should really be true but was getting the error below on every second build.
23-
// `ERROR in Cannot read property 'incrementalState' of null`
24-
"enableIvy": false,
21+
"enableIvy": true,
2522
"disableTypeScriptVersionCheck": true
2623
}
2724
}

0 commit comments

Comments
 (0)