Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All files are excluded when exclude function contains || #61

Open
cxy930123 opened this issue Jul 22, 2020 · 0 comments
Open

All files are excluded when exclude function contains || #61

cxy930123 opened this issue Jul 22, 2020 · 0 comments

Comments

@cxy930123
Copy link

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);
    }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant