From cc7c072f6ffa1aeaa4b96d434c50c24ae3b8ee19 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Fri, 12 Oct 2018 01:28:12 +0700 Subject: [PATCH] local-cli: restore symlink scanning in default case Commit 9a77ff5 seems to disable symlink scanning for apps that don't have a config file. This commit should restore that, without breaking those with a config file. Fixes #21735 --- local-cli/util/Config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/local-cli/util/Config.js b/local-cli/util/Config.js index f3ae068937bb2b..854e8261739040 100644 --- a/local-cli/util/Config.js +++ b/local-cli/util/Config.js @@ -41,15 +41,16 @@ const resolveSymlinksForRoots = roots => * error found when Flow v0.70 was deployed. To see the error delete this * comment and run Flow. */ (arr, rootPath) => arr.concat(findSymlinkedModules(rootPath, roots)), - [...roots], + [], ); const getWatchFolders = () => { const root = process.env.REACT_NATIVE_APP_ROOT; if (root) { - return resolveSymlinksForRoots([path.resolve(root)]); + const rootFullPath = path.resolve(root); + return [rootFullPath, ...resolveSymlinksForRoots([rootFullPath])]; } - return []; + return resolveSymlinksForRoots([getProjectRoot()]); }; const getBlacklistRE = () => {