產生包含外掛程式執行時間的 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
)拖放到分析器中。然後它將顯示時間軸統計資料和每個外掛程式的呼叫次數!