File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
packages/vite-plugin-checker/src Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,20 @@ export function createIgnore(_root: string, pattern: string | string[] = []) {
66 const paths = Array . isArray ( pattern ) ? pattern : [ pattern ]
77 const root = _root . replace ( / \\ / g, '/' )
88
9- const globs = paths . flatMap ( ( f ) => {
10- const resolvedPath = resolve ( root , f )
11- const relativePath = relative ( root , resolvedPath ) . replace ( / \\ / g, '/' )
12- try {
13- const isDirectory =
14- ! relativePath . includes ( '*' ) && statSync ( resolvedPath ) . isDirectory ( )
15- if ( isDirectory ) {
16- return [ relativePath , join ( relativePath , '**/*' ) . replace ( / \\ / g, '/' ) ]
17- }
18- } catch { }
19- return [ relativePath ]
20- } )
9+ const globs = paths
10+ . flatMap ( ( f ) => {
11+ const resolvedPath = resolve ( root , f )
12+ const relativePath = relative ( root , resolvedPath ) . replace ( / \\ / g, '/' )
13+ try {
14+ const isDirectory =
15+ ! relativePath . includes ( '*' ) && statSync ( resolvedPath ) . isDirectory ( )
16+ if ( isDirectory ) {
17+ return [ relativePath , join ( relativePath , '**/*' ) . replace ( / \\ / g, '/' ) ]
18+ }
19+ } catch { }
20+ return [ relativePath ]
21+ } )
22+ . filter ( Boolean )
2123
2224 const matcher = picomatch ( globs , { cwd : root } )
2325
You can’t perform that action at this time.
0 commit comments