mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 06:04:15 +00:00
Add gating to the JS delta client on the remote debugger
Reviewed By: jeanlauliac Differential Revision: D5940923 fbshipit-source-id: 1ef4cd52ef3567f2e726217636253802a2e6bb40
This commit is contained in:
parent
b3fc64285e
commit
a0e88c2a5b
@ -14,8 +14,8 @@ const launchChrome = require('../util/launchChrome');
|
|||||||
|
|
||||||
const {exec} = require('child_process');
|
const {exec} = require('child_process');
|
||||||
|
|
||||||
function launchChromeDevTools(port) {
|
function launchChromeDevTools(port, args = '') {
|
||||||
var debuggerURL = 'http://localhost:' + port + '/debugger-ui';
|
var debuggerURL = 'http://localhost:' + port + '/debugger-ui' + args;
|
||||||
console.log('Launching Dev Tools...');
|
console.log('Launching Dev Tools...');
|
||||||
launchChrome(debuggerURL);
|
launchChrome(debuggerURL);
|
||||||
}
|
}
|
||||||
@ -25,7 +25,10 @@ function escapePath(pathname) {
|
|||||||
return '"' + pathname + '"';
|
return '"' + pathname + '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
function launchDevTools({port, projectRoots}, isChromeConnected) {
|
function launchDevTools(
|
||||||
|
{port, projectRoots, useDeltaBundler},
|
||||||
|
isChromeConnected,
|
||||||
|
) {
|
||||||
// Explicit config always wins
|
// Explicit config always wins
|
||||||
var customDebugger = process.env.REACT_DEBUGGER;
|
var customDebugger = process.env.REACT_DEBUGGER;
|
||||||
if (customDebugger) {
|
if (customDebugger) {
|
||||||
@ -39,7 +42,7 @@ function launchDevTools({port, projectRoots}, isChromeConnected) {
|
|||||||
});
|
});
|
||||||
} else if (!isChromeConnected()) {
|
} else if (!isChromeConnected()) {
|
||||||
// Dev tools are not yet open; we need to open a session
|
// Dev tools are not yet open; we need to open a session
|
||||||
launchChromeDevTools(port);
|
launchChromeDevTools(port, useDeltaBundler ? '#useDeltaBundler' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,6 +206,10 @@
|
|||||||
connectToDebuggerProxy();
|
connectToDebuggerProxy();
|
||||||
|
|
||||||
async function getBlobUrl(url) {
|
async function getBlobUrl(url) {
|
||||||
|
if (window.location.hash.indexOf('useDeltaBundler') === -1) {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
return await window.deltaUrlToBlobUrl(url.replace('.bundle', '.delta'));
|
return await window.deltaUrlToBlobUrl(url.replace('.bundle', '.delta'));
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user