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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v9.1.2

* [Fix removed files handling in watch mode](https://github.com/TypeStrong/ts-loader/pull/1293) - thanks @gasnier

## v9.1.1

* [update CHANGELOG.md for 8.2.0 release](https://github.com/TypeStrong/ts-loader/pull/1291) - thanks @johnnyreilly
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-loader",
"version": "9.1.1",
"version": "9.1.2",
"description": "TypeScript loader for webpack",
"main": "index.js",
"types": "dist",
Expand Down Expand Up @@ -101,4 +101,4 @@
"typescript": "*",
"webpack": "*"
}
}
}
6 changes: 4 additions & 2 deletions src/after-compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ function determineFilesToCheckForErrors(
).keys()) {
const fileToCheckForErrors =
files.get(fileName) || otherFiles.get(fileName);
addFileToCheckForErrors(fileName, fileToCheckForErrors!);
if (fileToCheckForErrors) {//file may have been removed
addFileToCheckForErrors(fileName, fileToCheckForErrors);
}
}
}
}
Expand All @@ -184,7 +186,7 @@ function determineFilesToCheckForErrors(
return filesToCheckForErrors;

function addFileToCheckForErrors(filePath: FilePathKey, file: TSFile) {
if (!isReferencedFile(instance, filePath)) {
if (file && !isReferencedFile(instance, filePath)) {
filesToCheckForErrors.set(filePath, file);
}
}
Expand Down