We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bfc45a commit 9452e7eCopy full SHA for 9452e7e
packages/react-scripts/scripts/start.js
@@ -60,6 +60,19 @@ function run(port) {
60
pathname: '/',
61
});
62
63
+ let prettyHost;
64
+ if (HOST === '0.0.0.0' || HOST === '::') {
65
+ prettyHost = 'localhost';
66
+ } else {
67
+ prettyHost = HOST;
68
+ }
69
+ const prettyUrl = url.format({
70
+ protocol,
71
+ hostname: prettyHost,
72
+ port,
73
+ pathname: '/',
74
+ });
75
+
76
// Create a webpack compiler that is configured with custom messages.
77
const compiler = createWebpackCompiler(
78
config,
@@ -100,7 +113,7 @@ function run(port) {
100
113
console.log(chalk.cyan('Starting the development server...'));
101
114
console.log();
102
115
103
- openBrowser(formattedUrl);
116
+ openBrowser(prettyUrl);
104
117
105
118
}
106
119
0 commit comments