mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot 6
parent
c4699d8b73
commit
6c22a2174e
6
packager/react-packager/src/Bundler/index.js
vendored
6
packager/react-packager/src/Bundler/index.js
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user