website/docs/en/plugins/webpack/progress-plugin.mdx
import { Table } from '@builtIns';
This plugin can be used to configure the progress bar.
Rspack uses indicatif::ProgressBar to draw the progress bar.
new rspack.ProgressPlugin(options);
Provide a handler function which will be called when hooks report progress. handler function arguments:
percentage: a number between 0 and 1 indicating the completion percentage of the compilationmessage: a short description of the currently-executing hookinfo: extra progress information
builtModules: number of built modulesmoduleIdentifier: identifier of the active module (only provided during build modules updates)const handler = (percentage, message, info) => {
// e.g. Output each progress message directly to the console:
console.info(percentage, message, info.builtModules, info.moduleIdentifier);
};
new rspack.ProgressPlugin(handler);
string'Rspack'The text will be displayed before the progress bar.
booleanfalseTells ProgressPlugin to collect profile data for progress steps.
string● {prefix:.bold} {bar:25.green/white.dim} ({percent}%) {wide_msg:.dim}The template of progress bar.
Also see indicatif::ProgressBar::with_template.
string | string[] | undefinedundefinedThe tick string sequence for spinners, if it's string then it will be split into characters.
Also see indicatif::ProgressBar::tick_strings.
string━━The progress characters (filled, current, to do).
Also see indicatif::ProgressBar::progress_chars.