Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(v6): stub
@storybook/react
types till `@redwoodjs/cli-storybook…
…` is installed (#9027) Supersedes #9015. In v6, we decoupled Storybook from the framework. But generators still generate stories. If a user hasn't set up Storybook, but generates a page, etc (which is pretty much what happens in the tutorial), they'll see a type error in the `*.stories.{tsx,jsx}` file. See https://community.redwoodjs.com/t/redwood-v6-0-0-upgrade-guide/5044/35. Ideally, we just wouldn't generate stories if a user hasn't set up Storybook. But the tutorial is written as if these story files were just around this whole time, which is how the framework has worked and works. I think we can eventually get to the point where Storybook is fully decoupled, but I don't have a good idea of the amount of work that would need to be done, and am already focused on other projects (Docker). So this seems like the simplest fix for now without undoing the work we did. @Tobbe had the idea here of stubbing the types till the `@redwoodjs/cli-storybook` is installed. --------- Co-authored-by: Tobbe Lundberg <[email protected]> Co-authored-by: Daniel Choudhury <[email protected]>
- Loading branch information