Skip to content

Commit

Permalink
Use asset name to check against allowedFiles / skippedFiles regex (mo…
Browse files Browse the repository at this point in the history
…re reliable)
  • Loading branch information
Moustachos committed Oct 4, 2024
1 parent 4b072ff commit 483d337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class FontminPlugin {
const minifiableFonts = _(fontFiles)
.groupBy('font')
.filter(font => {
const fontName = font[0].font
const fontName = font[0].asset.split('/').pop()
if (allowedFiles instanceof RegExp) {
if (!fontName.match(allowedFiles)) {
log(`Font "${fontName}" not allowed by pattern: ${allowedFiles}.`)
Expand Down

0 comments on commit 483d337

Please sign in to comment.