Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/cli/src/server/middleware/getDevToolsMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
import launchChrome from '../util/launchChrome';
import logger from '../../util/logger';

function launchChromeDevTools(host, port, args = '') {
const debuggerURL = `http://${host}:${port}/debugger-ui${args}`;
function launchChromeDevTools(port, args = '') {
const debuggerURL = `http://localhost:${port}/debugger-ui${args}`;
logger.info('Launching Dev Tools...');
launchChrome(debuggerURL);
}

function launchDevTools({ host, port, watchFolders }, isChromeConnected) {
function launchDevTools({ port, watchFolders }, isChromeConnected) {
// Explicit config always wins
const customDebugger = process.env.REACT_DEBUGGER;
if (customDebugger) {
customDebugger({ watchFolders, customDebugger });
} else if (!isChromeConnected()) {
// Dev tools are not yet open; we need to open a session
launchChromeDevTools(host, port);
launchChromeDevTools(port);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
},
{
command: '--host [string]',
default: '0.0.0.0',
default: '',
},
{
command: '--watchFolders [list]',
Expand Down