watch recursive

Summary: Plugin files in subfolders were not watched. Adding recursive flag to reload plugins, even when there are changes in any of the plugin's subdirectories.

Reviewed By: jknoxville

Differential Revision: D14100394

fbshipit-source-id: 2a0b5e35df4bbbfe6cf8a0fafd5271222d99a46c
This commit is contained in:
Daniel Büchele
2019-02-15 06:21:50 -08:00
committed by Facebook Github Bot
parent d5dc3f9c2a
commit c6752110cf

View File

@@ -64,7 +64,7 @@ function watchChanges(
console.log('🕵️‍ Watching for plugin changes');
Object.values(plugins).map(plugin =>
fs.watch(plugin.rootDir, (eventType, filename) => {
fs.watch(plugin.rootDir, {recursive: true}, (eventType, filename) => {
// only recompile for changes in not hidden files. Watchman might create
// a file called .watchman-cookie
if (!filename.startsWith('.')) {