Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): remove socket status and log options.dev.publicPath only if specified #2849

Merged
merged 3 commits into from
Nov 20, 2020
Merged
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
16 changes: 7 additions & 9 deletions lib/utils/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
const colors = require('./colors');
const runOpen = require('./runOpen');

// TODO: don't emit logs when webpack-dev-server is used via Node.js API
function status(uri, options, logger, useColor) {
if (options.socket) {
logger.info(`Project is running at ${colors.info(useColor, uri)}`);

if (options.dev && options.dev.publicPath) {
logger.info(
`Listening to socket at ${colors.info(useColor, options.socket)}`
`webpack output is served from ${colors.info(
useColor,
options.dev.publicPath
)}`
);
} else {
logger.info(`Project is running at ${colors.info(useColor, uri)}`);
}

logger.info(
`webpack output is served from ${colors.info(useColor, options.publicPath)}`
);

if (options.static && options.static.length > 0) {
logger.info(
`Content not from webpack is served from ${colors.info(
Expand Down