feat(cli): bump webpack@5

This commit is contained in:
chenjiahan
2020-10-13 19:15:32 +08:00
parent 438dcbc0ff
commit 30c24ba23f
8 changed files with 315 additions and 817 deletions

View File

@@ -24,7 +24,7 @@ function runDevServer(
const server = new WebpackDevServer(webpack(config), config.devServer);
// this is a hack to disable wds status log
(server as any).showStatus = function() {};
(server as any).showStatus = function () {};
const host = get(config.devServer, 'host', 'localhost');
server.listen(port, host, (err?: Error) => {
@@ -58,7 +58,7 @@ function build() {
const config = getSitePrdConfig();
webpack(config, (err, stats) => {
if (err || stats.hasErrors()) {
if (err || (stats && stats.hasErrors())) {
reject();
} else {
resolve();