Navigation Menu

Skip to content

Commit

Permalink
fix: add ionicons dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 28, 2022
1 parent 6e86b9d commit 8a1a6bd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build.config.ts
@@ -0,0 +1,6 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
// TODO: fix in unbuild
externals: ['node:fs'],
})
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -60,6 +60,7 @@
"@ionic/vue-router": "^6.2.0",
"@kevinmarrec/nuxt-pwa": "^0.4.2",
"@nuxt/kit": "^3.0.0-rc.6",
"ionicons": "^6.0.2",
"pathe": "^0.3.2",
"pkg-types": "^0.3.3",
"ufo": "^0.8.5",
Expand Down
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/parts/icons.ts
@@ -1,11 +1,11 @@
import { useNuxt } from '@nuxt/kit'
import { defineUnimportPreset } from 'unimport'
import * as icons from 'ionicons/icons'
import * as icons from 'ionicons/icons/index.mjs'

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

0 comments on commit 8a1a6bd

Please sign in to comment.