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 Sep 13, 2016
1 parent 04b84df commit 898a76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Expand Up @@ -516,7 +516,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++;
}
Expand Down

0 comments on commit 898a76d

Please sign in to comment.