mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 19:15:05 +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,
|
||||
+platform: ?string,
|
||||
+recursive: boolean,
|
||||
+rootEntryFile: string,
|
||||
|};
|
||||
|
||||
/**
|
||||
@ -113,6 +114,7 @@ function attachHMRServer<TModule: Moduleish>(
|
||||
const response = await packagerServer.getDependencies({
|
||||
dev: true,
|
||||
entryFile: bundleEntry,
|
||||
rootEntryFile: bundleEntry,
|
||||
hot: true,
|
||||
minify: false,
|
||||
platform: platform,
|
||||
@ -137,6 +139,7 @@ function attachHMRServer<TModule: Moduleish>(
|
||||
const dependencies = await packagerServer.getShallowDependencies({
|
||||
dev: true,
|
||||
entryFile: dep.path,
|
||||
rootEntryFile: bundleEntry,
|
||||
hot: true,
|
||||
minify: false,
|
||||
platform: platform,
|
||||
@ -249,6 +252,7 @@ function attachHMRServer<TModule: Moduleish>(
|
||||
dev: true,
|
||||
minify: false,
|
||||
entryFile: filename,
|
||||
rootEntryFile: client.bundleEntry,
|
||||
hot: true,
|
||||
platform: client.platform,
|
||||
recursive: true,
|
||||
@ -269,6 +273,7 @@ function attachHMRServer<TModule: Moduleish>(
|
||||
const response = await packagerServer.getDependencies({
|
||||
dev: true,
|
||||
entryFile: filename,
|
||||
rootEntryFile: client.bundleEntry,
|
||||
hot: true,
|
||||
minify: false,
|
||||
platform: client.platform,
|
||||
|
Loading…
x
Reference in New Issue
Block a user