Skip to content

@nuxt/icon does not work

Open
Open

Description

Environment


  • Operating System: Darwin
  • Node Version: v20.17.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.13.2
  • Nitro Version: 2.9.7
  • Package Manager: npm@10.8.2
  • Builder: -
  • User Config: devtools, modules, app, i18n, icon, imports, runtimeConfig, vue, compatibilityDate, vite
  • Runtime Modules: @nuxtjs/storybook@8.3.0-28771560.b2b9b16, @nuxt/image@1.8.0, @pinia/nuxt@0.5.3, @nuxt/icon@1.5.1, @nuxtjs/i18n@8.5.3
  • Build Modules: -

Reproduction

https://github.com/exophunk/nuxt-storybook-showcase

Describe the bug

Using the official Nuxt Icon module does not work with storybook. Icons do not show in storybook stories. As far as I tested, both remote Icons from iconify, but also local icons do not work.

is there anyway to configure nuxt + storybook + icons to work? Storybook for visual components is pretty pointless if they don't show correctly.

Reproduction Repo: https://github.com/exophunk/nuxt-storybook-showcase
Stackblitz: https://stackblitz.com/~/github.com/exophunk/nuxt-storybook-showcase
although on stackblitz, i'm never able to get this things run properly
See the NuxtIcon story.

<Icon name="uil:github" style="color: black" />

Problem: No output at all (empty template)

Additional context

The reproduction uses a baseURL to showcase another issue but Icons should not be touched by that. Open the app at localhost:3000/my-base or remove baseurl for this example. but should not matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions