Skip to content

Commit 27b920b

Browse files
committedNov 27, 2019
fix: fix the warning message when it's only used the LQIP loader
1 parent d518ce9 commit 27b920b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎lib/loaders/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const { applyResponsiveLoader } = require('./responsive-loader')
66
* Checks if a node module is installed in the current context
77
*
88
* @param {string} name - module name
9-
* @param {string} resolvePath - optional resolve path
109
* @returns {boolean}
1110
*/
1211
const isModuleInstalled = (name) => {
@@ -90,7 +89,11 @@ const getHandledImageTypes = (moduleConfig) => {
9089
* @returns {number}
9190
*/
9291
const getNumOptimizationLoadersInstalled = loaders => Object.values(loaders)
93-
.filter(loader => loader && (loader.startsWith('imagemin-') || loader.startsWith('webp-'))).length
92+
.filter(loader => loader && (
93+
loader.startsWith('imagemin-') ||
94+
loader.startsWith('webp-') ||
95+
loader.startsWith('lqip-')
96+
)).length
9497

9598
/**
9699
* Appends all loaders to the webpack configuration

0 commit comments

Comments
 (0)
Please sign in to comment.