Skip to content

Commit 7ac1b36

Browse files
committed
fix: vite root
1 parent 91c3120 commit 7ac1b36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fs/glob.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export function searchComponents(ctx: Context) {
1010
const files = fg.sync(ctx.globs, {
1111
ignore: ['node_modules'],
1212
onlyFiles: true,
13+
cwd: ctx.viteConfig?.root || process.cwd(),
1314
})
1415

15-
if (!files.length)
16+
if (!files.length && !ctx.options.customComponentResolvers?.length)
1617
console.warn('[vite-plugin-components] no components found')
1718

1819
debug(`${files.length} components found.`)

0 commit comments

Comments
 (0)