cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.02k stars 174 forks source link

a question about filePath.match(exclude) #75

Open xsdream opened 3 years ago

xsdream commented 3 years ago

my exclude use function: image

If the path is matched, then the previous judgment condition is true, and the execution goes to [filePath.match(exclude) !== null] it will error!

image

xsdream commented 3 years ago

match support function ?

yuningjiang123 commented 2 years ago

I might have misunderstood, but shouldn't the if clause skip the subsequent judgement and just directly return true when "type.isFunction(exclude) && exclude(filePath)" is true?