-
Notifications
You must be signed in to change notification settings - Fork 980
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 Storybook (Vite) framework package #10064
Merged
Tobbe
merged 68 commits into
redwoodjs:main
from
arimendelow:ari/add-storybook-framework-package
Jun 4, 2024
Merged
Add Storybook (Vite) framework package #10064
Tobbe
merged 68 commits into
redwoodjs:main
from
arimendelow:ari/add-storybook-framework-package
Jun 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Tobbe Lundberg <[email protected]>
Co-authored-by: Tobbe Lundberg <[email protected]>
Co-authored-by: Tobbe Lundberg <[email protected]>
…add-storybook-framework-package
…add-storybook-framework-package
Left to do (in this, or separate PR)
|
Josh-Walker-GM
added a commit
that referenced
this pull request
Jun 6, 2024
Co-authored-by: Josh GM Walker <[email protected]> Co-authored-by: Tobbe Lundberg <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR is the first step to migrating our Storybook integration from relying on Webpack to relying on Vite. Specifically, this PR:
react-vite
framework package.storybook-vite
CLI package, which is based on the existingstorybook
CLI package. The CLI package does two important things before running the Storybook command:Importantly, the architecture of this (including duplicating files, etc.) is based on the eventual goal of removing the older Storybook integration files.
Proof
This screen recording shows that the following works:
Details
This framework package is based on the proof of concept of getting Storybook working on RedwoodJS with Vite, which is documented here.
Please see that and official Storybook framework package documentation to understand implementation details.
Outstanding
yarn redwood storybook
, and make the new oneyarn redwood storybook-vite
.yarn redwood storybook-webpack
.Trying it out
First step is, of course, pulling down this branch.
I've been testing this with the generated test project. If you want to do that, from the framework repo, first run:
yarn run build:test-project ../for-testing-storybook-vite
Then, over in your project, run
yarn rwfw project:tarsync
so that the module resolutions point to the ones in this branch.Then, I think because it hasn't yet been published anywhere, you'll need to manually add the new CLI package (yarn complains about not being able to find the packument when I try to get the CLI package to autoinstall):
Then, run:
Your browser should then open to Storybook!