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() {