Using the official Nuxt Image module does not work with storybook, when using a baseUrl like /my-base/. The images are broken, because the path can't be found. It does work on the page itself, but not in the stories.
is there anyway to configure nuxt + storybook + baseUrl + nuxtimage to work?
/my-base/_ipx/q_50&blur_3&s_30x20/images/sb-nuxt-logo.jpg is not found in storybook (localhost:6006)
/my-base/_ipx/q_50&blur_3&s_30x20/images/sb-nuxt-logo.jpg works correctly in app (localhost:3000)
Is it possible to:
Make storybook respect baseURL?
As a workaround: pass custom nuxt config when starting app in storybook to not use baseUrl there?
Additional context
The whole baseUrl stuff doesnt seem to run properly in stackblitz, you might be better off testing locally
Environment
Build Modules: -
Reproduction
https://github.com/exophunk/nuxt-storybook-showcase
Describe the bug
Using the official Nuxt Image module does not work with storybook, when using a
baseUrl
like/my-base/
. The images are broken, because the path can't be found. It does work on the page itself, but not in the stories.is there anyway to configure nuxt + storybook + baseUrl + nuxtimage to work?
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 [NuxtImage](https://github.com/exophunk/nuxt-storybook-showcase/blob/main/components/NuxtIcon.stories.ts) story.
Problem: image path is wrong
/my-base/_ipx/q_50&blur_3&s_30x20/images/sb-nuxt-logo.jpg
is not found in storybook (localhost:6006
)/my-base/_ipx/q_50&blur_3&s_30x20/images/sb-nuxt-logo.jpg
works correctly in app (localhost:3000
)Is it possible to:
Additional context
The whole baseUrl stuff doesnt seem to run properly in stackblitz, you might be better off testing locally