Skip to content

Commit

Permalink
fix(filecheck): ignore compression of other files
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Nov 28, 2022
1 parent 1ff2d52 commit a6a0df6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions filecheck/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,12 @@ async function checkCompression(filePath, options) {
plugins.push(imageminGifsicle());
} else if (extension === ".svg") {
plugins.push(imageminSvgo());
} else {
throw new Error(`No plugin for ${extension}`);
}

if (!plugins.length) {
return;
}

const files = await imagemin([filePath], {
destination: tempdir,
plugins,
Expand Down

0 comments on commit a6a0df6

Please sign in to comment.