Skip to content

Commit adbb2de

Browse files
committed
fix: add ionicons dependency
1 parent 82fe569 commit adbb2de

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

build.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
// TODO: fix in unbuild
5+
externals: ['node:fs'],
6+
})

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@ionic/vue-router": "^6.2.0",
6161
"@kevinmarrec/nuxt-pwa": "^0.4.2",
6262
"@nuxt/kit": "^3.0.0-rc.6",
63+
"ionicons": "^6.0.2",
6364
"pathe": "^0.3.2",
6465
"pkg-types": "^0.3.3",
6566
"ufo": "^0.8.5",

pnpm-lock.yaml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parts/icons.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useNuxt } from '@nuxt/kit'
22
import { defineUnimportPreset } from 'unimport'
3-
import * as icons from 'ionicons/icons'
3+
import * as icons from 'ionicons/icons/index.mjs'
44

55
const iconsPreset = defineUnimportPreset({
66
from: 'ionicons/icons',
77
// @ts-ignore-next-line
8-
imports: Object.keys(icons.default || icons).map(name => ({
8+
imports: Object.keys(icons).map(name => ({
99
name,
1010
as: 'ionicons' + name[0].toUpperCase() + name.slice(1),
1111
})),

0 commit comments

Comments
 (0)