nuxt-modules / storybook

Storybook integration with Nuxt.
https://storybook.nuxtjs.org
404 stars 94 forks source link

Nuxt Storybook Module does not pick up on Nuxt Icon Module (couldn't be shown) #672

Closed simon-kramer closed 1 month ago

simon-kramer commented 3 months ago

Hello again! I got an issue with the integration of the nuxt icon module (iconify) and the storybook nuxt module. If i try to implement the icons there, my component inside the nuxt instance itself works fine, but if i try to display them inside the storybook docs, it fails.

https://nuxt.com/modules/icon

As you can see in the image below, the setup is as following:

Uploaded-using-RayThis-Extension(5) Uploaded-using-RayThis-Extension(6) Uploaded-using-RayThis-Extension(7)

The story is set up like this:

Uploaded-using-RayThis-Extension(8)

The issue handed out by the console is this:

Bildschirmfoto 2024-07-04 um 10 24 56

It looks like it couldn't dynamically fetch the icon on runtime, because it has no control over the nuxt instance (from storybook side).

I would appreciate your help!

tobiasdiez commented 3 months ago

Could you please provide a reproduction? In the best case as a PR against this repo adding the Nuxt Icon module as an example similar to https://github.com/nuxt-modules/storybook/commit/b1fdb175a72d5045bfc863056d40b2cac0858b16 (to make sure we don't break it in the future again).

simon-kramer commented 3 months ago

Ok will do it. Thanks for the fast answer, will reach back here as soon as i've opened it.

tobiasdiez commented 1 month ago

Closing this issue due to inactivity :zzz: Please reopen the issue with additional information if the problem persists.