From fdd6b4ebee40e47abdb3b70a27d97c7029a12920 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Wed, 3 Jan 2018 16:55:38 +0200 Subject: [PATCH] Feature: SourceMapDevToolPlugin progress: PR changes --- lib/SourceMapDevToolPlugin.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js index 117ca286f..6f0434f98 100644 --- a/lib/SourceMapDevToolPlugin.js +++ b/lib/SourceMapDevToolPlugin.js @@ -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;