Merge pull request #6066 from zhengbli/i6016_for17
Roll back to polling file watching for 1.7
This commit is contained in:
commit
8c6105f4dc
1 changed files with 0 additions and 5 deletions
|
@ -411,11 +411,6 @@ namespace ts {
|
|||
// and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649
|
||||
// and https://github.com/Microsoft/TypeScript/issues/4643), therefore
|
||||
// if the current node.js version is newer than 4, use `fs.watch` instead.
|
||||
if (isNode4OrLater()) {
|
||||
// Note: in node the callback of fs.watch is given only the relative file name as a parameter
|
||||
return _fs.watch(fileName, (eventName: string, relativeFileName: string) => callback(fileName));
|
||||
}
|
||||
|
||||
const watchedFile = watchedFileSet.addFile(fileName, callback);
|
||||
return {
|
||||
close: () => watchedFileSet.removeFile(watchedFile)
|
||||
|
|
Loading…
Reference in a new issue