mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Metro HMR: Add file parameter to getShallowDependencies()
Reviewed By: jeanlauliac Differential Revision: D5687991 fbshipit-source-id: c2db3986c6a5ec81ed1350ded92dfcf1b529c2bc
This commit is contained in:
parent
f266ab9bac
commit
0b17524134
@ -38,6 +38,7 @@ type DependencyOptions = {|
|
|||||||
+minify: boolean,
|
+minify: boolean,
|
||||||
+platform: ?string,
|
+platform: ?string,
|
||||||
+recursive: boolean,
|
+recursive: boolean,
|
||||||
|
+rootEntryFile: string,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,6 +114,7 @@ function attachHMRServer<TModule: Moduleish>(
|
|||||||
const response = await packagerServer.getDependencies({
|
const response = await packagerServer.getDependencies({
|
||||||
dev: true,
|
dev: true,
|
||||||
entryFile: bundleEntry,
|
entryFile: bundleEntry,
|
||||||
|
rootEntryFile: bundleEntry,
|
||||||
hot: true,
|
hot: true,
|
||||||
minify: false,
|
minify: false,
|
||||||
platform: platform,
|
platform: platform,
|
||||||
@ -137,6 +139,7 @@ function attachHMRServer<TModule: Moduleish>(
|
|||||||
const dependencies = await packagerServer.getShallowDependencies({
|
const dependencies = await packagerServer.getShallowDependencies({
|
||||||
dev: true,
|
dev: true,
|
||||||
entryFile: dep.path,
|
entryFile: dep.path,
|
||||||
|
rootEntryFile: bundleEntry,
|
||||||
hot: true,
|
hot: true,
|
||||||
minify: false,
|
minify: false,
|
||||||
platform: platform,
|
platform: platform,
|
||||||
@ -249,6 +252,7 @@ function attachHMRServer<TModule: Moduleish>(
|
|||||||
dev: true,
|
dev: true,
|
||||||
minify: false,
|
minify: false,
|
||||||
entryFile: filename,
|
entryFile: filename,
|
||||||
|
rootEntryFile: client.bundleEntry,
|
||||||
hot: true,
|
hot: true,
|
||||||
platform: client.platform,
|
platform: client.platform,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
@ -269,6 +273,7 @@ function attachHMRServer<TModule: Moduleish>(
|
|||||||
const response = await packagerServer.getDependencies({
|
const response = await packagerServer.getDependencies({
|
||||||
dev: true,
|
dev: true,
|
||||||
entryFile: filename,
|
entryFile: filename,
|
||||||
|
rootEntryFile: client.bundleEntry,
|
||||||
hot: true,
|
hot: true,
|
||||||
minify: false,
|
minify: false,
|
||||||
platform: client.platform,
|
platform: client.platform,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user