Skip to content

Commit e694050

Browse files
authoredApr 28, 2023
fix: avoid warning when not needed, fix #314 (#368)
1 parent 2ff023c commit e694050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/ctx.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ${dts}`.trim()}\n`
5757

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

6363
options.ignore?.forEach((name) => {

0 commit comments

Comments
 (0)
Please sign in to comment.