Skip to content

Commit

Permalink
Use readFile for declarations too
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
Standa Opichal committed Oct 21, 2016
1 parent deab3ea commit e2088ef
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 e2088ef

Please sign in to comment.