Skip to content

Commit

Permalink
Update createFileTransform.ts (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon authored Dec 14, 2021
1 parent 0b9d40e commit 11e3982
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/createFileTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,21 @@ export function createEntryResolver(name: string) {
export function createFileTransform(name: string) {
return (entry: ReadEntry) => {
// Binary files, don't process these (avoid decoding as utf8)
if (!['.png', '.jar', '.keystore'].includes(path.extname(entry.path)) && name) {
if (
![
'.png',
'.jpg',
'.jpeg',
'.gif',
'.webp',
'.psd',
'.tiff',
'.svg',
'.jar',
'.keystore',
].includes(path.extname(entry.path)) &&
name
) {
return new Transformer(name);
}
return undefined;
Expand Down

0 comments on commit 11e3982

Please sign in to comment.