Stats hooks
StatsFactory
StatsFactory.hooks.extract
A HookMap, called when generating the specified stats item.
- Type:
HookMap<SyncBailHook<[Object, any, StatsFactoryContext], undefined>> - Arguments:
Object: result stats item object which properties should be added.Class: the original data of the stats itemStatsFactoryContext: generating context
For the following example, the customProperty attribute is added in the finally generated stats.compilation through MyPlugin:
StatsFactory.hooks.result
A HookMap, called after generating the specified stats item.
- Type:
HookMap<SyncWaterfallHook<[any[], StatsFactoryContext], undefined>> - Arguments:
any[]: generated stats item resultStatsFactoryContext: generating context
StatsPrinter
StatsPrinter.hooks.print
A HookMap, called
为一个 HookMap, called when generating the printed string of the specified stats item.
- Type:
HookMap<SyncBailHook<[{}, StatsPrinterContext], string>> - Arguments:
Object: stats item objectStatsPrinterContext: printing context
StatsPrinter.hooks.result
A HookMap, called after generating the printed string of the specified stats item.
- Type:
HookMap<SyncBailHook<[{}, StatsPrinterContext], string>> - Arguments:
String: printed string of the stats itemStatsPrinterContext: printing context

