From d29fe75d29bd7bafd3d0a47c0e520e683326390c Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 12 Aug 2025 21:30:19 +0300 Subject: [PATCH] perf: avoid recreation errors and warnings --- src/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 04268ce..f8e0a1b 100644 --- a/src/index.js +++ b/src/index.js @@ -360,9 +360,8 @@ class ImageMinimizerPlugin { }); } - compilation.warnings = [...compilation.warnings, ...output.warnings]; - - compilation.errors = [...compilation.errors, ...output.errors]; + compilation.warnings.push(...output.warnings); + compilation.errors.push(...output.errors); if (compilation.getAsset(output.filename)) { compilation.updateAsset(