Denoder / nuxt-module-alternatives

Alternative modules to use while waiting for Nuxt 3 Compatibility
MIT License
144 stars 14 forks source link

Svg Sprite Module #98

Closed fedeweb closed 2 years ago

fedeweb commented 2 years ago

Hi,

I have an issue with the svg sprite module.

In the config file I imported it in this way:

export default defineNuxtConfig({ typescript: { shim: false }, modules: [ 'nuxt-purgecss','@nuxtjs-alt/svg-sprite' ] })

If I use the svg-icon component then I have this error:

<svg-icon name="people" />

Uncaught (in promise) ReferenceError: useNuxtApp is not defined at setup (SvgIcon.vue:10:24)

I'm using Nuxt 3 rc.11

Thanks, Federico

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

fedeweb commented 2 years ago

Hi @Teranode,

I'm sorry to bother you. Do you need a reproduction from me? I thought the tag "needs-reproduction" meant that you need to reproduce the bug :)

Thanks,

Federico

Denoder commented 2 years ago

Yes I need a reproduction from you.

fedeweb commented 2 years ago

Hi @Teranode,

you can see here the issue:

https://stackblitz.com/edit/nuxt-3-windicss-nyyq12?file=app.vue

Thanks,

Federico

Denoder commented 2 years ago

you should probably use: https://github.com/nuxt-community/svg-sprite-module/tree/nuxt3 I was unaware they had worked on a nuxt3 module at the time.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.