Skip to content

Commit 8453c2d

Browse files
test: hold hotspots-clean to the plugin it burns with
On a loaded runner webpack's own DefaultStatsPresetPlugin held the main thread for 228 ms, past the hint's 100 ms floor, and the case that a plugin costing nothing stays unnamed failed on a warning about another plugin. It now ignores hotspot warnings that do not name BurnPlugin. Claude-Session: https://claude.ai/code/session_017TkBWTk3wcyUcJYDp5ZhaP
1 parent e6c792c commit 8453c2d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎test/configCases/performance/hotspots-clean/webpack.config.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,12 @@ module.exports = {
2424
hints: "warning",
2525
hotspots: true
2626
},
27-
plugins: [burn(0)]
27+
plugins: [burn(0)],
28+
// A loaded runner can hold the thread in webpack's own plugins for longer
29+
// than the hint's floor; what this case holds is that BurnPlugin goes unnamed.
30+
ignoreWarnings: [
31+
(warning) =>
32+
warning.name === "HotspotsWarning" &&
33+
!warning.message.includes("BurnPlugin")
34+
]
2835
};

0 commit comments

Comments
 (0)