-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
build-storybook --output-dir flag does not correctly set root path for static files #12052
Comments
Don't use |
@shilman thanks for that. Using |
Serve does some weird automatic mangling of URLs like iframe.html => iframe ... which storybook does not like |
huh.. didn't realise that. Good to know. |
I switched from using This is the same issue that was referenced in #6030 using storybook 5.3.9 |
I'm facing weird situation like mentioned. The So it's exactly what you were mentioning @shilman (#12052 (comment)) except I'm using This strange thing was also mentioned at #6030 (comment) but since he is using Any idea how to solve this? Important:
If I do a refresh I do understand how 301 redirections work and stay in the browser cache... but I don't understand what is setting this? And why it's happening to me? For more context, I'm running 2 Storybooks at the same time, one referencing another one, in a monorepo but in 2 different packages with the cache being separated from each other (it should after check). @ndelangen according your answer, can this setup messes with an 301? (ref of context: #12108 (comment)) Thank you, EDIT: I guess you prefer a reproduction repo' but I just started the project a few days ago and trying to build up things (even if familiar to Storybook). There is a few documentation to set it up locally, but don't loose your time if the stack with |
You might have a serviceWorker still running on the same origin, maybe? |
I went too fast on reading this (thought someone had issues with By default Some threads about this: vercel/serve#404 vercel/serve#565 Thank you all, |
Describe the bug
When running
build-storybook -s ./static -o public/storybook
for example, you would expect, when serving the site (Gatsby in my case) from thepublic
directory that visiting/storybook
would show the statically-built storybook - it does not.The problem that I'm getting is that even though the output directory is
public/storybook
, storybook itself references itsdll
or.js
files from the root of thepublic
directory.I get errors like this in my browser console:
The storybook files should be located within the
public/storybook
directory, and the page would workTo Reproduce
Steps to reproduce the behavior:
build-storybook -s ./static -o public/storybook
public/storybook
directory/public
directory using something likeserve
e.g.serve public
Expected behavior
The Storybook should work as per usual
Screenshots
Code snippets
n/a
System:
I am running
6.0.10
of every storybook package.I tried running the command (
npx sb@next info
) but it threw an error (this issue is tracking that bug):Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: