From e20e9759ee7f390f09a246282e667386f510b067 Mon Sep 17 00:00:00 2001 From: Atsuto Yamashita Date: Mon, 1 Mar 2021 20:20:21 +0900 Subject: [PATCH] hide blurredPlaceholders warning (#1151) --- .../lib/transformers/AddBlurryImagePlaceholders.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/optimizer/lib/transformers/AddBlurryImagePlaceholders.js b/packages/optimizer/lib/transformers/AddBlurryImagePlaceholders.js index 08af364d7..55116bd0b 100644 --- a/packages/optimizer/lib/transformers/AddBlurryImagePlaceholders.js +++ b/packages/optimizer/lib/transformers/AddBlurryImagePlaceholders.js @@ -77,10 +77,12 @@ class AddBlurryImagePlaceholders { // generation at runtime this.missingDependencies_ = false; if (!isDependencyInstalled('jimp') || !isDependencyInstalled('lru-cache')) { - this.log_.warn( - 'jimp and lru-cache need to be installed via `npm install jimp lru-cache` ' + - 'for this transformer to work' - ); + if (this.blurredPlaceholders_) { + this.log_.warn( + 'jimp and lru-cache need to be installed via `npm install jimp lru-cache` ' + + 'for this transformer to work' + ); + } // we can't generate placeholders this.blurredPlaceholders_ = false; this.missingDependencies_ = true;