Skip to content

Commit 1aa0d2d

Browse files
authored
refactor: remove socket status and log options.dev.publicPath only if specified (#2849)
1 parent cf2847d commit 1aa0d2d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

lib/utils/status.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
const colors = require('./colors');
44
const runOpen = require('./runOpen');
55

6-
// TODO: don't emit logs when webpack-dev-server is used via Node.js API
76
function status(uri, options, logger, useColor) {
8-
if (options.socket) {
7+
logger.info(`Project is running at ${colors.info(useColor, uri)}`);
8+
9+
if (options.dev && options.dev.publicPath) {
910
logger.info(
10-
`Listening to socket at ${colors.info(useColor, options.socket)}`
11+
`webpack output is served from ${colors.info(
12+
useColor,
13+
options.dev.publicPath
14+
)}`
1115
);
12-
} else {
13-
logger.info(`Project is running at ${colors.info(useColor, uri)}`);
1416
}
1517

16-
logger.info(
17-
`webpack output is served from ${colors.info(useColor, options.publicPath)}`
18-
);
19-
2018
if (options.static && options.static.length > 0) {
2119
logger.info(
2220
`Content not from webpack is served from ${colors.info(

0 commit comments

Comments
 (0)