ProgressPlugin
此插件可以用来配置进度条。
Rspack 使用 indicatif::ProgressBar 绘制进度条.
选项
Function
提供一个处理函数,当 hooks 进度更新时将调用该函数。handler 函数参数为:
percentage:0 到 1 之间的数字,表示编译的完成百分比message:关于当前执行 hook 的简短描述...args:零个或多个描述当前进度的附加字符串
Object
prefix
- Type:
string - Default:
'Rspack'
进度条前显示文案。
profile
- Type:
boolean - Default:
false
是否收集进度步骤的性能数据。
template
- Type:
string - Default:
● {prefix:.bold} {bar:25.green/white.dim} ({percent}%) {wide_msg:.dim}
进度条的模板。
详情查阅 indicatif::ProgressBar::with_template.
tick
- Type:
string | string[] | undefined - Default:
undefined
Spinner 变化的字符串序列,如果是字符串,则会被拆分为字符。
详情查阅 indicatif::ProgressBar::tick_strings.
progressChars
- Type:
string - Default:
━━
组成进度条的字符。

