-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] - Can't load images with build-storybook under "/static" directory #2948
Comments
Should it be |
Hi @Hypnosphi this will not solve my issue as this will copy the static folder to the root folder and all my images are directed to "/static/path/to/file" which will make them inaccessible |
I read about solutions with using a custom express middleware, but they're not working with build-storybook as its not running an actual server. Any way around this? |
I'm not sure it's a good idea to serve all your project files as statics (that's what happens with
Can you please elaborate this part a bit more |
@Hypnosphi I agree, its a bad idea :) this is why Im looking for alternatives. --
|
Duplicates #714 |
Issue details
I have a folder of static assets under /static in the root dir.
All my assets in the project go to /static/path/to/file, I use a babel config to enable it.
To mimic this behaviour I'm running storybook-build like this
build-storybook -c .storybook -s .
my .storybook/config looks like this
percy-io/percy-storybook: "^1.3.2"
storybook/react: "^3.3.12"
Im also using nextjs as my react project.
the build just hangs on the "info => Copying static files from: ." command.
This config works just fine with start-storybook or if I define -s to anything but the root folder. But in order for my assets to be properly loaded I need the -s to point to the root
How can I fix this?
Thanks!
The text was updated successfully, but these errors were encountered: