vite-plugin-vue icon indicating copy to clipboard operation
vite-plugin-vue copied to clipboard

filter advance

Open sushoucanyuan opened this issue 2 years ago • 1 comments

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

sushoucanyuan avatar Apr 11 '23 06:04 sushoucanyuan

PR welcome

edison1105 avatar Sep 24 '24 07:09 edison1105