From 0b17524134e7139686570f957744cee62f8336b1 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Thu, 24 Aug 2017 08:15:57 -0700 Subject: [PATCH] Metro HMR: Add file parameter to getShallowDependencies() Reviewed By: jeanlauliac Differential Revision: D5687991 fbshipit-source-id: c2db3986c6a5ec81ed1350ded92dfcf1b529c2bc --- local-cli/server/util/attachHMRServer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local-cli/server/util/attachHMRServer.js b/local-cli/server/util/attachHMRServer.js index 4632ddc59..2e6191876 100644 --- a/local-cli/server/util/attachHMRServer.js +++ b/local-cli/server/util/attachHMRServer.js @@ -38,6 +38,7 @@ type DependencyOptions = {| +minify: boolean, +platform: ?string, +recursive: boolean, + +rootEntryFile: string, |}; /** @@ -113,6 +114,7 @@ function attachHMRServer( const response = await packagerServer.getDependencies({ dev: true, entryFile: bundleEntry, + rootEntryFile: bundleEntry, hot: true, minify: false, platform: platform, @@ -137,6 +139,7 @@ function attachHMRServer( const dependencies = await packagerServer.getShallowDependencies({ dev: true, entryFile: dep.path, + rootEntryFile: bundleEntry, hot: true, minify: false, platform: platform, @@ -249,6 +252,7 @@ function attachHMRServer( dev: true, minify: false, entryFile: filename, + rootEntryFile: client.bundleEntry, hot: true, platform: client.platform, recursive: true, @@ -269,6 +273,7 @@ function attachHMRServer( const response = await packagerServer.getDependencies({ dev: true, entryFile: filename, + rootEntryFile: client.bundleEntry, hot: true, minify: false, platform: client.platform,