生成包含插件执行时序的 Chrome 配置文件。默认情况下输出 `events.json` 文件。可以使用 `outputPath` 选项提供自定义文件路径。
注意:ProfilingPlugin 仅接受绝对路径。
outputPath
:自定义输出文件(json)的绝对路径new webpack.debug.ProfilingPlugin();
outputPath
new webpack.debug.ProfilingPlugin({
outputPath: path.join(__dirname, 'profiling/profileEvents.json'),
});
要查看配置文件
ProfilingPlugin
运行 webpack。性能
选项卡(以前称为 时间线
)。events.json
)拖放到分析器中。然后它将显示每个插件的时间线统计信息和调用!