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

filter advance #149

Open
5 of 6 tasks
sushoucanyuan opened this issue Apr 11, 2023 · 1 comment
Open
5 of 6 tasks

filter advance #149

sushoucanyuan opened this issue Apr 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@sushoucanyuan
Copy link

Related plugins

Description

According to the existing code:

const filter = createFilter(include || /\.[jt]sx$/, exclude)
...
if (filter(id) || filter(filepath)) {

We cannot exclude files by querying strings, for example /\?xxx$/

Suggested solution

Change the code to

const includeFilter = createFilter(include || /\.[jt]sx$/)
const excludeFilter = createFilter('**',exclude)
...
if((includeFilter(id) || includeFilter(filepath)) && excludeFilter(id) && excludeFilter(filepath)){

Alternative

No response

Additional context

No response

Validations

@edison1105
Copy link
Member

PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants