Open visualjeff opened 1 year ago
@visualjeff It's definitely possible to use the vite builder with 6.5, although it does work better and is easier to configure in 7.0. If you're not seeing any errors in the console or the terminal, are you seeing any activity in the network tab? I see that you do not have storyStoreV7
enabled, which means that all of your stories and associated components are sent to the browser all at once at page load, rather than on demand when you load each story. Since vite does not compile files together in dev, this can take quite a while to send to the browser for large projects.
If that doesn't seem to be the issue, maybe something else is happening. Do builds complete successfully, or do you get an error? If they complete, do you still see the infinite spinner when you load it up (with npx http-server storybook-static
for instance)?
First off Ian, thank you for your time.
I will set the storyStoreV7 so its enabled.
Builds using vite do complete fine.
Anyway, let me try storyStoreV7 and get back.
Jeff
So the left nav rendered pretty quick but the iframe content take some time (Skeletons showing) and eventually after a few minutes they did render. Here is what the terminal was showing:
Is there a configuration setting I'm missing?
eventually after a few minutes they did render
Is that with storyStoreV7
turned on? That seems like a long time, though I have seen times on the order of 30 seconds to a minute before, for initial startup. You may want to look to see if you have any index.js
files that re-export from lots of other files, which can cause more modules than necessary to be loaded.
You could also try out the 7.0 beta, which may be a bit faster to start up from cold, because the manager is pre-built and webpack isn't used. If you decide to try it out, you can run npx sb@next upgrade --prerelease
With storyStoreV7 it does seem to start off faster. That is an interesting point about index.js files being re-exported lots of other files. We do re-exporting. Do you know if Storybook has any best practices pertaining to this?
Really appreciate your help and input. I'm making some progress. Stories are being rendered. It just takes a while.
What version of
vite
are you using?3.2.5
System info and storybook versions
System:
Binaries:
Browsers:
devDependencies:
Describe the Bug
Migrated from CRA using builder-vite and all I'm seeing a loadering spinner. So my question is, can a team use builder-vite with Storybook 6.5 or should we wait until Storybook 7 is formally released?
.storybook/main.js
.storybook/preview.jsx
Link to Minimal Reproducible Example
No response
Participation