fix(nuxt): correct components dir regexp

This commit is contained in:
Daniel Roe 2024-05-16 21:37:59 -05:00
parent cf736e2745
commit dad89c2b16
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -18,7 +18,7 @@ function compareDirByPathLength ({ path: pathA }: { path: string }, { path: path
return pathB.split(/[\\/]/).filter(Boolean).length - pathA.split(/[\\/]/).filter(Boolean).length return pathB.split(/[\\/]/).filter(Boolean).length - pathA.split(/[\\/]/).filter(Boolean).length
} }
const DEFAULT_COMPONENTS_DIRS_RE = /\/components\/(?:global|islands)?$/ const DEFAULT_COMPONENTS_DIRS_RE = /\/components(?:\/(?:global|islands))?$/
export type getComponentsT = (mode?: 'client' | 'server' | 'all') => Component[] export type getComponentsT = (mode?: 'client' | 'server' | 'all') => Component[]