You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added the TestComponent.vue, image in static/img/, and used it in pages/index.vue. Added TestComponent.stories.js
Checked that everything worked correctly via yarn nuxt and yarn nuxt storybook (it did).
Moved the source directory to src. 1) Added srcDir: 'src' to nuxt.config.js, 2) moved the assets, components, layouts, middleware, pages, plugins, static, and store directories under a src folder
reran yarn nuxt and yarn nuxt storybook. the site is fine, but storybook fails to load the image from the static directory.
What is Expected?
The image should load in storybook
What is actually happening?
The image isn't loading in storybook (but works fine on the main site)
The text was updated successfully, but these errors were encountered:
I tried doing this like a month ago (and didn't know this repo existed) and EVERYTHING SUCKED. It was clear that nuxt/storybook should be sharing webpack setup, but making them do was painful. THANK YOU SO MUCH FOR DOING THIS
Version
@nuxtjs/storybook: ^2.1.0
nuxt: ^2.14.0
Reproduction Link
https://github.com/ryanechternacht/nuxt-storybook-static-issue
Steps to reproduce
The repo above demonstrates the issue.
To create it I did the following
npx create-nuxt-app nuxt-storybook-static-issue
yarn add --dev @nuxtjs/storybook
TestComponent.vue
, image instatic/img/
, and used it inpages/index.vue
. AddedTestComponent.stories.js
yarn nuxt
andyarn nuxt storybook
(it did).src
. 1) AddedsrcDir: 'src'
tonuxt.config.js
, 2) moved theassets
,components
,layouts
,middleware
,pages
,plugins
,static
, andstore
directories under asrc
folderyarn nuxt
andyarn nuxt storybook
. the site is fine, but storybook fails to load the image from thestatic
directory.What is Expected?
The image should load in storybook
What is actually happening?
The image isn't loading in storybook (but works fine on the main site)
The text was updated successfully, but these errors were encountered: