-
-
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
Angular lazy load stories #9831
Comments
@thomasoreilly -- what went wrong with async imports? I believe that folks using the Stencil framework (web components) are successfully doing that with SB. Perhaps there is some webpack changes needed in the Angular preset? Aside from that it would be nice if Storybook officially supported async stories so that addons knew when async story had finished rendering. But my understanding is things mostly work if you can get the mechanics going. |
Hey @tmeasday. What I've tried is to dynamically load the story's example component using the import('myExampleComponent'). I'd like to be able to only load the split bundle per story example component on route change. A possible solution would be to pass in a promise as the story function which could handle the resolve. |
Yeah, I don't have an open source example I can point you to (maybe @shilman does?) but my understanding was that the stories themselves were loaded syncronously but the components themselves were loaded async. Which sounds like what you describe as the possible solution. I think(?) this might be built into Stencil natively. |
There are lots of stencil example repos linked here: #4600 I'm not sure which is a "best practice" implementation unfortunately. (Would love to figure that out!) |
Thanks @shilman. I had a quick look through that PR and may have found an idea to try out. It's not ideal though. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Is your feature request related to a problem? Please describe.
Slow initial load when storybook has a large amount of stories.
Describe the solution you'd like
Ability to lazy load Angular stories.
Describe alternatives you've considered
I tried async imports to no avail.
Are you able to assist bring the feature to reality?
Maybe
Additional context
I don't have any
The text was updated successfully, but these errors were encountered: