Update dev-server.ts

This commit is contained in:
Michael Shilman 2020-11-24 21:29:24 +08:00 committed by GitHub
parent 25f87dd0b2
commit 8e752915bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,7 @@ const useProgressReporting = async (
value = Math.max(newValue, value); // never go backwards
const progress = { value, message: message.charAt(0).toUpperCase() + message.slice(1) };
if (message === 'building') {
// arg3 undefined in webpack5
const counts = arg3 && arg3.match(/(\d+)\/(\d+)/) || [];
const complete = parseInt(counts[1], 10);
const total = parseInt(counts[2], 10);