Feature: SourceMapDevToolPlugin progress: PR changes

This commit is contained in:
EugeneHlushko 2018-01-03 16:55:38 +02:00
parent fe83f52b0a
commit fdd6b4ebee
1 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,7 @@ class SourceMapDevToolPlugin {
const tasks = [];
const reportProgress = (context && context.reportProgress) ? context.reportProgress : () => {};
reportProgress(0.0, "SourceMapDevToolPlugin generation starting");
reportProgress(0.0, "Generation starting...");
chunks.forEach(chunk => {
chunk.files.forEach(file => {
if(matchObject(file)) {
@ -161,8 +161,7 @@ class SourceMapDevToolPlugin {
usedNamesSet.add(sourceName);
}
tasks.forEach((task, index) => {
let progressFloat = (1.0 / tasks.length * index).toFixed(2);
reportProgress(progressFloat, `Generating sourcemaps ${index + 1}/${tasks.length}`);
reportProgress(index / tasks.length, `Generating sourcemap ${index + 1} of ${tasks.length}: ${task.file}`);
const chunk = task.chunk;
const file = task.file;
const asset = task.asset;