Skip to content
Closed
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
7 changes: 7 additions & 0 deletions packages/language-service/src/typescript_host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,14 @@ export class TypeScriptServiceHost implements LanguageServiceHost {

// Check if any source files have been added / changed since last computation.
const seen = new Set<string>();
const ANGULAR_CORE = '@angular/core';
const corePath = this.reflectorHost.moduleNameToFileName(ANGULAR_CORE);
for (const {fileName} of program.getSourceFiles()) {
// If the `@angular/core` has been edited, the language service should be restart,
// so ignore the change of `@angular/core`.
if (fileName === corePath) {
continue;
}
seen.add(fileName);
const version = this.tsLsHost.getScriptVersion(fileName);
const lastVersion = this.fileVersions.get(fileName);
Expand Down