From 7cf1c7f51fd2d3433a4792a2bc2fb0202618f7ce Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Thu, 24 Mar 2016 12:05:48 -0700 Subject: [PATCH] Fix fetching sourcemap in genymotion. Fixes #5338 Summary:Source maps are broken on Genymotion right now as they aren't being loaded from the correct URL. refer - https://github.com/facebook/react-native/issues/5338#issuecomment-188232402 **Test plan** Build and install UIExplorer from master branch in genymotion and enable hot reload. When you change a file and save it, you'll see a Yellow box due to source map fetching failed, as per the referenced comment. Doing the same for this branch doesn't produce any yellow boxes. Closes https://github.com/facebook/react-native/pull/6594 Differential Revision: D3088218 Pulled By: martinbigio fb-gh-sync-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b shipit-source-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b --- react-packager/src/Bundler/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react-packager/src/Bundler/index.js b/react-packager/src/Bundler/index.js index 8d630528..52bb3ad2 100644 --- a/react-packager/src/Bundler/index.js +++ b/react-packager/src/Bundler/index.js @@ -170,9 +170,9 @@ class Bundler { }); } - _sourceHMRURL(platform, host, port, path) { + _sourceHMRURL(platform, path) { return this._hmrURL( - `http://${host}:${port}`, + '', platform, 'bundle', path, @@ -217,7 +217,7 @@ class Bundler { return this._bundle({ ...options, bundle: new HMRBundle({ - sourceURLFn: this._sourceHMRURL.bind(this, options.platform, host, port), + sourceURLFn: this._sourceHMRURL.bind(this, options.platform), sourceMappingURLFn: this._sourceMappingHMRURL.bind( this, options.platform,