mirror of https://github.com/status-im/metro.git
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:
parent
4ea783234b
commit
7cf1c7f51f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue