Skip to content

Commit a9ef0d7

Browse files
committed
fix: transpile ionicons
1 parent 7fa2826 commit a9ef0d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/parts/icons.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as icons from 'ionicons/icons/index.mjs'
44

55
const iconsPreset = defineUnimportPreset({
66
from: 'ionicons/icons',
7-
// @ts-ignore-next-line
7+
// @ts-expect-error upstream typing issue
88
imports: Object.keys(icons).map(name => ({
99
name,
1010
as: 'ionicons' + name[0].toUpperCase() + name.slice(1),
@@ -14,6 +14,8 @@ const iconsPreset = defineUnimportPreset({
1414
export const setupIcons = () => {
1515
const nuxt = useNuxt()
1616

17+
nuxt.options.build.transpile.push('ionicons/icons')
18+
1719
nuxt.hook('autoImports:sources', presets => {
1820
presets.push(iconsPreset)
1921
})

0 commit comments

Comments
 (0)