-
Notifications
You must be signed in to change notification settings - Fork 994
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
[Bug?]: yarn rw sbv --build
(with vite) does not seem to output a working storybook
#11419
Comments
Thanks @pvenable, @arimendelow do you think you'd be able to look into this one? |
Yup, will do today! 😀 |
@pvenable, RedwoodJS v8 was just released — would you mind giving that a try? In v8, the old Webpack version was removed, so the command for the new Vite version is just Also — on your test project, did you create any components? Because if not, I'm thinking that maybe nothing was built because there were no stories 😶 — and it's possible that this behavior is different between Webpack and Vite. I've just given v8 a try (with one simple component), and had no issues. Give that a test with an empty project, and let me know what you find — for example, if you're having issues in v7 but not in v8, the solution is probably to just upgrade. If you're still having issues in v8, however, then I definitely want to take a closer look. For example, on your primary project, are you able to run the Storybook dev server? Do you at any time see build errors? Did you have custom Storybook configs, and if so, did you migrate them over? Here's some proof of it working on my end: |
Hi, @arimendelow, thanks for the response.
Not in this repro, but I tried that previously. In my repro instructions I tried to leave out unnecessary steps, but I should probably have mentioned that it fails even with a component. Once I was convinced of the problem I created the minimal repro instructions from scratch. With all that said:
I can confirm that at least based on my repro steps v8 does indeed appear to build a working storybook 🎉, so it's possible this issue is not needed other than to direct others to upgrade to v8 if they encounter this issue on v7.
Yes, the dev server works fine as far as I can tell. We do have custom Storybook configs, but they were pretty straightforward to port over for the vite version. I'm glad to see that building a storybook with vite appears to work properly in v8! I look forward to upgrading our main app to v8 when I have a chance. Thanks! |
Yay!!! Yeah, definitely post back here once you upgrade your main app and let us know how it goes 🙂 |
We've upgraded to 8.0.0 and our storybook builds/deploys successfully on vite. Thanks again! 👍 |
Hooray!!!! 🥳 |
What's not working?
Building a (webpack-based) storybook with
yarn rw sb --build
works fine, and we've been using this successfully for a long time. I tried to move our storybook to vite using the recently added support and I don't seem to be able to produce a working build viayarn rw sbv --build
.As a sanity check I tried both of these commands on a fresh redwood 7.7.4 project and the results are the same --
yarn rw sb --build
produces a runnable storybook build, butyarn rw sbv --build
does not. I assume thestorybook-vite
version of this is intended to work, though I don't know this for sure. 🙂How do we reproduce the bug?
Using Node 20 and yarn 4:
First create a new redwood project:
yarn create redwood-app storybook-issue -y cd storybook-issue/
Build and run a webpack-based storybook, then serve it and visit
localhost:8080
to see a working (albeit empty) storybook:Now build and run a vite-based storybook instead. Serve it and visit
localhost:8080
to see no storybook -- just a directory listing 😢:Note that I'm not reporting any problems with storybook in development:
yarn rw sb
andyarn rw sbv
both seem to work fine.What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: