Skip to content

Commit

Permalink
Fix warning when only using lqip loader
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilwanner committed May 27, 2019
1 parent a767aec commit 2ccbb37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/loaders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ const getHandledImageTypes = (nextConfig) => {
* @returns {number}
*/
const getNumOptimizationLoadersInstalled = loaders => Object.values(loaders)
.filter(loader => loader && (loader.startsWith('imagemin-') || loader.startsWith('webp-'))).length;
.filter(loader => loader && (
loader.startsWith('imagemin-')
|| loader.startsWith('webp-')
|| loader.startsWith('lqip-')
)).length;

/**
* Appends all loaders to the webpack configuration
Expand Down

0 comments on commit 2ccbb37

Please sign in to comment.