Skip to content

Commit

Permalink
fix: vite root
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 10, 2021
1 parent 91c3120 commit 7ac1b36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fs/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export function searchComponents(ctx: Context) {
const files = fg.sync(ctx.globs, {
ignore: ['node_modules'],
onlyFiles: true,
cwd: ctx.viteConfig?.root || process.cwd(),
})

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

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

0 comments on commit 7ac1b36

Please sign in to comment.