-
Notifications
You must be signed in to change notification settings - Fork 604
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
[heft-storybook] Support storybook static build #3843
[heft-storybook] Support storybook static build #3843
Conversation
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.
@octogonz does this make sense to you? The idea is to be able to produce storybook assets alongside the webpack assets during a build, but not during start mode.
heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Ian Clanton-Thuon <[email protected]>
@RongqiZ - Can you sign the CLA? #3843 (comment) |
…/github.com/RongqiZ/rushstack into user/rongqizhou/SupportStorybookStaticBuild
|
@microsoft-github-policy-service agree [company="Microsoft"] |
Sure, updated |
@microsoft-github-policy-service agree [company="Microsoft"] |
@microsoft-github-policy-service agree company="Microsoft" |
Very interesting! Where exactly does the static site get built in this model? The way we have been structuring this internally is usually something like:
In this structure, the dynamite app actually uses the storybook UI and has its own deployment scripts (terraform or whatever), and the sandbox project also has its own deployment scripts, so that the storybook site can be deployed somewhere QA and other teams can play with it. So the "storybook build" doesn't happen in the UI library, it happens in a separate project with its own dist folder. I'm wondering if this PR would be compatible with this approach, so we could cut out of some of our custom scripts. |
…portStorybookStaticBuild
…portStorybookStaticBuild # Conflicts: # common/config/rush/repo-state.json
We want to use storybook static build files with the heft.
So I added this plugin into the build actions, and we could pass the static build module path.
This is the heft config after change:
And this is the command in the package.json
So that in the local environment, developers could use
storybook
command to start the server to see the result.In the CI, we could use the
build-storybook
command to build static files for visual regressions.Test scenarios:
heft start --storybook
heft start --storybook
heft build --storybook
Summary
Details
How it was tested
Impacted documentation