Skip to content

Commit

Permalink
fix: avoid warning when not needed, fix #314 (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
damirbogdanov authored Apr 28, 2023
1 parent 2ff023c commit e694050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ${dts}`.trim()}\n`

const importsPromise = flattenImports(options.imports)
.then((imports) => {
if (!imports.length && !resolvers.length)
if (!imports.length && !resolvers.length && !dirs?.length)
console.warn('[auto-import] plugin installed but no imports has defined, see https://github.com/antfu/unplugin-auto-import#configurations for configurations')

options.ignore?.forEach((name) => {
Expand Down

0 comments on commit e694050

Please sign in to comment.