Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
chore: upgrade imaginemin-webp to v7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed Jan 4, 2022
1 parent 5e241b4 commit af32e63
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 106 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,14 @@ module.exports = function(content) {
if(options.optipng.enabled !== false)
plugins.push(require('imagemin-optipng')(options.optipng));
// optional optimizers
if(options.webp.enabled !== false)
plugins.push(require('imagemin-webp')(options.webp));
if(options.webp.enabled !== false) {
async function loadWebp() {
await import('imagemin-webp').then(({ default: imageminWebp}) => {
plugins.push(imageminWebp(options.webp));
});
}
loadWebp()
}

imagemin
.buffer(content, {
Expand Down
191 changes: 89 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"imagemin-optipng": "^8.0.0",
"imagemin-pngquant": "^9.0.2",
"imagemin-svgo": "^9.0.0",
"imagemin-webp": "^6.0.0"
"imagemin-webp": "^7.0.0"
},
"devDependencies": {
"file-loader": "^6.2.0",
"rimraf": "^3.0.2",
"webpack": "^4.46.0",
"webpack-cli": "^4.8.0"
"webpack-cli": "^4.9.1"
}
}

0 comments on commit af32e63

Please sign in to comment.