Skip to content

Commit fe83f52

Browse files
committed
Feature: SourceMapDevToolPlugin progress: wip
1 parent 7621c46 commit fe83f52

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/SourceMapDevToolPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ 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}`);
164166
const chunk = task.chunk;
165167
const file = task.file;
166168
const asset = task.asset;
@@ -184,8 +186,6 @@ class SourceMapDevToolPlugin {
184186
}
185187
const sourceMapString = JSON.stringify(sourceMap);
186188
if(sourceMapFilename) {
187-
let progressFloat = (1.0 / tasks.length * index).toFixed(2);
188-
reportProgress(progressFloat, `Generating sourcemap for: ${sourceMapFilename}`);
189189
let filename = file;
190190
let query = "";
191191
const idx = filename.indexOf("?");

0 commit comments

Comments
 (0)