Closed
Description
Recently upgraded Nuxt Icon in my SPA Nuxt app (using Nuxt 3.3 with SSR set to false and strict typescript) and hit a bug when running npm run generate
.
node_modules/nuxt-icon/dist/runtime/IconCSS.vue:6:28 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.
6 const aliases = appConfig?.nuxtIcon?.aliases || {}
~~~~~~~~
node_modules/nuxt-icon/dist/runtime/Icon.vue:11:28 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.
11 const aliases = appConfig?.nuxtIcon?.aliases || {}
~~~~~~~~
node_modules/nuxt-icon/dist/runtime/IconCSS.vue:25:39 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.
25 if (!props.size && typeof appConfig.nuxtIcon?.size === 'boolean' && !appConfig.nuxtIcon?.size) {
~~~~~~~~
node_modules/nuxt-icon/dist/runtime/Icon.vue:28:44 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.
28 const iconName = computed(() => (appConfig.nuxtIcon?.aliases || {})[props.name] || props.name)
~~~~~~~~
node_modules/nuxt-icon/dist/runtime/IconCSS.vue:28:40 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.
28 const size = props.size || appConfig.nuxtIcon?.size || '1em'
~~~~~~~~
Found 6 errors in 2 files.
Errors Files
4 node_modules/nuxt-icon/dist/runtime/IconCSS.vue:6
2 node_modules/nuxt-icon/dist/runtime/Icon.vue:11
Created minimal reproduction and posted code on public github repo available here: https://github.com/frasza/nuxt-icon-m-repro-bug
Metadata
Metadata
Assignees
Labels
No labels