Skip to content

Commit

Permalink
enable progress from config (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwholey authored and shellscape committed Dec 22, 2017
1 parent e8964d1 commit 7e89442
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ function processOptions(webpackOptions) {

if (argv.socket) { options.socket = argv.socket; }

if (argv.progress) { options.progress = argv.progress; }

if (!options.publicPath) {
// eslint-disable-next-line
options.publicPath = firstWpOpt.output && firstWpOpt.output.publicPath || '';
Expand Down Expand Up @@ -368,7 +370,7 @@ function startDevServer(webpackOptions, options) {
throw e;
}

if (argv.progress) {
if (options.progress) {
compiler.apply(new webpack.ProgressPlugin({
profile: argv.profile
}));
Expand Down Expand Up @@ -445,7 +447,8 @@ function reportReadiness(uri, options) {
if (options.socket) {
startSentence = `Listening to socket at ${colorInfo(useColor, options.socket)}`;
}
console.log((argv.progress ? '\n' : '') + startSentence);

console.log((options.progress ? '\n' : '') + startSentence);

console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);

Expand Down

0 comments on commit 7e89442

Please sign in to comment.