Page MenuHomePhabricator

D6257.id20903.diff
No OneTemporary

D6257.id20903.diff

diff --git a/patches/@expo+cli+0.4.10.patch b/patches/@expo+cli+0.4.10.patch
new file mode 100644
--- /dev/null
+++ b/patches/@expo+cli+0.4.10.patch
@@ -0,0 +1,22 @@
+diff --git a/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js b/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
+index 0a601bd..c76ba13 100644
+--- a/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
++++ b/node_modules/@expo/cli/build/src/start/server/BundlerDevServer.js
+@@ -255,6 +255,17 @@ class BundlerDevServer {
+ return `${location.protocol}://localhost:${location.port}`;
+ }
+ var _url;
++ if (location.host === 'localhost') {
++ try {
++ const { natDevHostname } = require('../../../../../../../native/facts/network.json');
++ if (!natDevHostname) throw "";
++ return `${location.protocol}://${natDevHostname}:${location.port}`;
++ }
++ catch {
++ var _ip = require("../../utils/ip");
++ return `${location.protocol}://${_ip.getIpAddress()}:${location.port}`;
++ }
++ }
+ return (_url = location.url) != null ? _url : null;
+ }
+ /** Get the base URL for JS inspector */ getJsInspectorBaseUrl() {

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:05 AM (18 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685984
Default Alt Text
D6257.id20903.diff (1 KB)

Event Timeline