Skip to content

fix: contentBase (static) logging #2744

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

Merged
merged 2 commits into from
Nov 16, 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
8 changes: 2 additions & 6 deletions lib/utils/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ 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) {
const contentBase = Array.isArray(options.contentBase)
? options.contentBase.join(', ')
: options.contentBase;

if (options.socket) {
logger.info(
`Listening to socket at ${colors.info(useColor, options.socket)}`
Expand All @@ -21,11 +17,11 @@ function status(uri, options, logger, useColor) {
`webpack output is served from ${colors.info(useColor, options.publicPath)}`
);

if (contentBase) {
if (options.static && options.static.length > 0) {
logger.info(
`Content not from webpack is served from ${colors.info(
useColor,
contentBase
options.static.map((staticOption) => staticOption.directory).join(', ')
)}`
);
}
Expand Down