mirror of https://github.com/webpack/webpack.git
Feature: SourceMapDevToolPlugin progress: PR changes
This commit is contained in:
parent
fe83f52b0a
commit
fdd6b4ebee
|
@ -90,7 +90,7 @@ class SourceMapDevToolPlugin {
|
||||||
const tasks = [];
|
const tasks = [];
|
||||||
const reportProgress = (context && context.reportProgress) ? context.reportProgress : () => {};
|
const reportProgress = (context && context.reportProgress) ? context.reportProgress : () => {};
|
||||||
|
|
||||||
reportProgress(0.0, "SourceMapDevToolPlugin generation starting");
|
reportProgress(0.0, "Generation starting...");
|
||||||
chunks.forEach(chunk => {
|
chunks.forEach(chunk => {
|
||||||
chunk.files.forEach(file => {
|
chunk.files.forEach(file => {
|
||||||
if(matchObject(file)) {
|
if(matchObject(file)) {
|
||||||
|
@ -161,8 +161,7 @@ class SourceMapDevToolPlugin {
|
||||||
usedNamesSet.add(sourceName);
|
usedNamesSet.add(sourceName);
|
||||||
}
|
}
|
||||||
tasks.forEach((task, index) => {
|
tasks.forEach((task, index) => {
|
||||||
let progressFloat = (1.0 / tasks.length * index).toFixed(2);
|
reportProgress(index / tasks.length, `Generating sourcemap ${index + 1} of ${tasks.length}: ${task.file}`);
|
||||||
reportProgress(progressFloat, `Generating sourcemaps ${index + 1}/${tasks.length}`);
|
|
||||||
const chunk = task.chunk;
|
const chunk = task.chunk;
|
||||||
const file = task.file;
|
const file = task.file;
|
||||||
const asset = task.asset;
|
const asset = task.asset;
|
||||||
|
|
Loading…
Reference in New Issue