nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
883 stars 41 forks source link

Bug: Icons do not render in full static mode in RC10 #8

Closed fayazara closed 1 year ago

fayazara commented 1 year ago

I am using this module and when I use it with RC10s full static mode. It does not render the icon, adds the icon name as a string.

Screenshot2022-09-17 at 18 30 35

As you can see, it is just using the fallback as the icon name instead of rendering the svg <span v-else class="icon" :style="{ fontSize: sSize, lineHeight: sSize, width: sSize, height: sSize }">{{ name }}</span>

CC: @Atinux

Atinux commented 1 year ago

I believe this will be resolved in RC11. Cc @pi0 @danielroe

Atinux commented 1 year ago

Tested on Nuxt Edge and works, can you confirm too @fayazara?

fayazara commented 1 year ago

Is nuxt edge a preview branch? @Atinux How do I use it?

danielroe commented 1 year ago

https://v3.nuxtjs.org/guide/going-further/edge-channel/

FileSoft-us commented 1 year ago

[vite:vue] Transform failed with 2 errors: 7:09:01 PM: /opt/build/repo/node_modules/nuxt-icon/dist/runtime/Icon.vue:8:0: ERROR: Transforming const to the configured target environment ("ES5") is not supported yet 7:09:01 PM: /opt/build/repo/node_modules/nuxt-icon/dist/runtime/Icon.vue:10:2: ERROR: Transforming const to the configured target environment ("ES5") is not supported yet

can you all advice me tsconfig "compilerOptions" target

Icon.vue:52 Uncaught TypeError: Cannot read properties of undefined (reading 'accept') at Icon.vue:52:102

danielroe commented 1 year ago

@sigliblog That seems like a different issue. Would happily look at it; would you mind opening a new issue with a reproduction? 🙏

danielroe commented 1 year ago

In my testing I can't reproduce this issue with RC11, so I'm closing it for now (but would welcome a new issue as mentioned above).