Skip to content

Commit

Permalink
Update src/core/unplugin.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Jul 23, 2024
1 parent 3b33f85 commit ce5dce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/unplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default createUnplugin<Options>((options) => {
const exclude = config.optimizeDeps?.exclude || []

const imports = new Set((await ctx.unimport.getImports()).map(i => i.from)
.filter(i => isPackageExists(i) && !exclude.includes(i)))
.filter(i => i.match(/^[a-z@]/) && !exclude.includes(i) && isPackageExists(i)))

if (!imports.size)
return
Expand Down

0 comments on commit ce5dce8

Please sign in to comment.