mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(nuxt): don't ignore components dirs with same prefix (#6116)
This commit is contained in:
parent
c7d072c495
commit
6c125bc941
@ -4,6 +4,7 @@ import { pascalCase, splitByCase } from 'scule'
|
|||||||
import type { Component, ComponentsDir } from '@nuxt/schema'
|
import type { Component, ComponentsDir } from '@nuxt/schema'
|
||||||
import { isIgnored } from '@nuxt/kit'
|
import { isIgnored } from '@nuxt/kit'
|
||||||
import { hyphenate } from '@vue/shared'
|
import { hyphenate } from '@vue/shared'
|
||||||
|
import { withTrailingSlash } from 'ufo'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan the components inside different components folders
|
* Scan the components inside different components folders
|
||||||
@ -31,7 +32,7 @@ export async function scanComponents (dirs: ComponentsDir[], srcDir: string): Pr
|
|||||||
for (const _file of files) {
|
for (const _file of files) {
|
||||||
const filePath = join(dir.path, _file)
|
const filePath = join(dir.path, _file)
|
||||||
|
|
||||||
if (scannedPaths.find(d => filePath.startsWith(d)) || isIgnored(filePath)) {
|
if (scannedPaths.find(d => filePath.startsWith(withTrailingSlash(d))) || isIgnored(filePath)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user