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(