Skip to content

Commit

Permalink
Use readFile for declarations too (#281)
Browse files Browse the repository at this point in the history
This let's the loader survive whenever the watched file gets removed.
  • Loading branch information
opichals authored and johnnyreilly committed Oct 22, 2016
1 parent 2d380b0 commit 236dabf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
filePath = path.normalize(filePath);
var file = instance.files[filePath];
if (file) {
file.text = fs.readFileSync(filePath, {encoding: 'utf8'});
file.text = readFile(filePath) || '';
file.version++;
instance.version++;
instance.modifiedFiles[filePath] = file;
Expand Down

0 comments on commit 236dabf

Please sign in to comment.