Skip to content

Commit fdd6b4e

Browse files
committed
Feature: SourceMapDevToolPlugin progress: PR changes
1 parent fe83f52 commit fdd6b4e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/SourceMapDevToolPlugin.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class SourceMapDevToolPlugin {
9090
const tasks = [];
9191
const reportProgress = (context && context.reportProgress) ? context.reportProgress : () => {};
9292

93-
reportProgress(0.0, "SourceMapDevToolPlugin generation starting");
93+
reportProgress(0.0, "Generation starting...");
9494
chunks.forEach(chunk => {
9595
chunk.files.forEach(file => {
9696
if(matchObject(file)) {
@@ -161,8 +161,7 @@ class SourceMapDevToolPlugin {
161161
usedNamesSet.add(sourceName);
162162
}
163163
tasks.forEach((task, index) => {
164-
let progressFloat = (1.0 / tasks.length * index).toFixed(2);
165-
reportProgress(progressFloat, `Generating sourcemaps ${index + 1}/${tasks.length}`);
164+
reportProgress(index / tasks.length, `Generating sourcemap ${index + 1} of ${tasks.length}: ${task.file}`);
166165
const chunk = task.chunk;
167166
const file = task.file;
168167
const asset = task.asset;

0 commit comments

Comments
 (0)