Skip to content

Commit

Permalink
Merge pull request #763 from webpack/bugfix/fix-vee-five-support
Browse files Browse the repository at this point in the history
fix(bin): use compiler.close API correctly for stats
  • Loading branch information
evenstensberg authored Mar 8, 2019
2 parents d7944b6 + 568161d commit f2bc8a2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
const stdout = argv.silent
? {
write: () => {}
} // eslint-disable-line
} // eslint-disable-line
: process.stdout;

function ifArg(name, fn, init) {
Expand Down Expand Up @@ -488,13 +488,18 @@ For more information, see https://webpack.js.org/api/cli/.`);
}
compiler.watch(watchOptions, compilerCallback);
if (outputOptions.infoVerbosity !== "none") console.error("\nwebpack is watching the files…\n");
if (compiler.close) compiler.close(compilerCallback);
} else {
compiler.run(compilerCallback);
if (compiler.close) compiler.close(compilerCallback);
compiler.run((err, stats) => {
if (compiler.close) {
compiler.close(err2 => {
compilerCallback(err || err2, stats);
});
} else {
compilerCallback(err, stats);
}
});
}
}

processOptions(options);
});
})();

0 comments on commit f2bc8a2

Please sign in to comment.