Skip to content

Commit 30b1fc7

Browse files
committed
Watch for node_modules hoisted above project root
1 parent f3ab41a commit 30b1fc7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/utilities/compile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ function buildWatchHooks(project, ts, callbacks) {
108108
function buildIgnoreRegex(rootDir, patterns) {
109109
let base = escapeRegex(rootDir);
110110
let sep = `[/\\\\]`;
111-
return new RegExp(`^${base}${sep}(${patterns.join('|')})${sep}`, 'i');
111+
return [
112+
'**/node_modules/**',
113+
new RegExp(`^${base}${sep}(${patterns.join('|')})${sep}`, 'i')
114+
];
112115
}
113116

114117
// On case-insensitive file systems, tsc will normalize paths to be all lowercase,

0 commit comments

Comments
 (0)