From c6752110cf4c425084cc55243d8f2ab26fc88147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Fri, 15 Feb 2019 06:21:50 -0800 Subject: [PATCH] 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 --- static/compilePlugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/compilePlugins.js b/static/compilePlugins.js index d57f37cf6c3..98902654ff5 100644 --- a/static/compilePlugins.js +++ b/static/compilePlugins.js @@ -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('.')) {