Skip to content

Commit

Permalink
fix: remove i- prefix in clientBundle.icons automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 3, 2024
1 parent c8850af commit ef77a4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export class NuxtIconModuleContext {
scan = false,
} = this.options.clientBundle || {}

const userIcons = new Set(this.options.clientBundle?.icons || [])
// Filter out the `i-` prefix and deduplicate
const userIcons = new Set((this.options.clientBundle?.icons || []).map(i => i.replace(/^i[-:]/, '')))
const scannedIcons = new Set<string>()

if (scan)
Expand Down

0 comments on commit ef77a4f

Please sign in to comment.