Skip to content
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

Core: Fix webpack5 compatibility check for ProgressPlugin #13239

Merged
merged 2 commits into from
Nov 24, 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
3 changes: 2 additions & 1 deletion lib/core/src/server/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ 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') {
const counts = arg3.match(/(\d+)\/(\d+)/) || [];
// arg3 undefined in webpack5
const counts = arg3 && arg3.match(/(\d+)\/(\d+)/) || [];
const complete = parseInt(counts[1], 10);
const total = parseInt(counts[2], 10);
if (!Number.isNaN(complete) && !Number.isNaN(total)) {
Expand Down