Skip to content

Commit fd46c6e

Browse files
committedNov 10, 2024··
fix(client-bundle): use addIcon instead of addCollection
1 parent 9b37e24 commit fd46c6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/bundle-client.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ export function registerClientBundle(
4444
const collectionsRaw = `JSON.parse(${JSON.stringify(valuesCompat)})`
4545

4646
return [
47-
'import { addCollection } from "@iconify/vue"',
47+
'import { addIcon } from "@iconify/vue"',
4848
'let _initialized = false',
4949
'export function init() {',
5050
' if (_initialized)',
5151
' return',
5252
` const collections = ${collectionsRaw}`,
5353
` for (const collection of collections) {`,
54-
' addCollection(collection)',
54+
` for (const [name, data] of Object.entries(collection.icons)) {`,
55+
` addIcon(collection.prefix + ':' + name, data)`,
56+
` }`,
5557
' }',
5658
' _initialized = true',
5759
'}',

0 commit comments

Comments
 (0)
Please sign in to comment.