postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

All files are excluded when exclude function contains ||

Open cxy930123 opened this issue 4 years ago • 0 comments

When exclude option is a function and it has operator ||, all files will be ignored.

For example, the following config will ignore all files:

require('postcss-pxtorem')({
    exclude: function exclude(file) {
      return /node_modules/i.test(file) || false;
    }
})

While the following code works properly:

require('postcss-pxtorem')({
    exclude: function exclude(file) {
      return /node_modules/i.test(file);
    }
})

cxy930123 avatar Jul 22 '20 02:07 cxy930123