-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add a flag to download assets locally #42
Comments
I haven't tried to do this yet with a Storybook install that works with server-rendered components, but Storybook supports generating a static webapp. Have you tried that? |
We have tried that as we use the static feature but the site ends up making a request to the URL listed in the server config. What I'm hoping for a is a way to work around that dependency |
Ah, interesting! I guess when Storybook is configured to use server-rendered components, it does not include the components in that static build. Which I suppose is a reasonable default, but I can see how it sort of defeats the purpose of generating a static build in the first place, depending on your expectation of what falls within the scope the “static build.” This |
Just noting that there is a storybook build command that will compile all the components as a static site. |
It appears that command does not include proactively generating static files for server-rendered components. |
Any update on this? I am looking how to generate storybook files that can be publicly accessible while still using cl_server for development. I haven't tried adjusting CORS settings so Storybook can run on production with cl_server yet, but I would prefer a static storybook build without the dependency of Drupal as mentioned here. |
Hello, this is a feature request. We're working on a project, and we'd like the storybook UI to generate a static version that can be shared without the Drupal site running.
I was wondering about the feasibility of getting a flag in the storybook config that would allow it to support that.
A couple of changes I think would need to be made:
storybook-drupal-addon/src/fetchStoryHtml.ts
Line 85 in 68c7a26
Ideally, we could then add a param to the storybook command that would be like.
npm run storybook --server-static --out=.out
and it would make the magic happen.Looking forward to hearing your thoughts
The text was updated successfully, but these errors were encountered: