-
-
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
Vite: Set default base
for subfolder deployments
#19383
Conversation
Hey @IanVS while trying to test this locally, I found an issue. How to reproduce:
Storybook should be served correctly, however no stories render in the preview.
If you serve the folder with |
Interesting, I'm honestly a bit surprised that |
so that I have a server running and I'm able to access storybook as a subpath e.g.
How do you quickly test a storybook-in-a-subfolder scenario? |
There's a set of steps in the referenced issue, though I honestly haven't tried them:
Browse to http://localhost:3000/docs/ |
@yannbf what's your current thinking on this change? |
Hi @yannbf, just another friendly ping. I've had a few more support issues come through recently that this PR would solve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping! I did some extra testing and it works perfectly. Sorry for the delay!
Issue: storybookjs/builder-vite#238
What I did
This sets the default
base
vite config to"./"
instead of the default"/"
. This allows storybook to be deployed in a subfolder, rather than forcing it to be at the root. I was reluctant to make the change in 6.5, in case it's breaking, but I don't think it really should be.