Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class AngularCompilerPlugin {
// TS compilation.
private _compilerOptions: CompilerOptions;
private _rootNames: string[];
private _program: (ts.Program | Program) | null;
private _program: (ts.Program | Program) | undefined;
private _compilerHost: WebpackCompilerHost & CompilerHost;
private _moduleResolutionCache: ts.ModuleResolutionCache;
private _resourceLoader?: WebpackResourceLoader;
Expand Down Expand Up @@ -673,7 +673,7 @@ export class AngularCompilerPlugin {
// only present for webpack 4.23.0+, assume true otherwise
const watchMode = rootCompiler.watchMode === undefined ? true : rootCompiler.watchMode;
if (!watchMode) {
this._program = null;
this._program = undefined;
this._transformers = [];
this._resourceLoader = undefined;
this._compilerHost.reset();
Expand Down Expand Up @@ -1385,7 +1385,7 @@ export class AngularCompilerPlugin {
} else {
errMsg = e.stack;
// It is not a syntax error we might have a program with unknown state, discard it.
this._program = null;
this._program = undefined;
code = UNKNOWN_ERROR_CODE;
}
allDiagnostics.push(
Expand Down
5 changes: 1 addition & 4 deletions tests/angular_devkit/build_webpack/angular-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
]
},
"angularCompilerOptions": {
// TODO: debug this problem.
// This should really be true but was getting the error below on every second build.
// `ERROR in Cannot read property 'incrementalState' of null`
"enableIvy": false,
"enableIvy": true,
"disableTypeScriptVersionCheck": true
}
}