Skip to content
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

[chore/feature]: Cleanup old storybook webpack integration and include preview.tsx template per default #11760

Open
Philzen opened this issue Dec 8, 2024 · 1 comment

Comments

@Philzen
Copy link
Contributor

Philzen commented Dec 8, 2024

Following up the discussion at #11745 (comment) (and below) we want to

  1. have a sensible preview.tsx (which already exists as template in the codebase) when installing cli-storybook-vite (which is done automatically since RW 8 on first execution of yarn rw sb).
  2. Cleanup the codebase of any scripts related to storybook + webpack (this may include [https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/lib/configureStorybook.js](configureStorybook.js), however it needs to be ensured that this is not needed anywhere else, i.e. https://github.com/redwoodjs/redwood/blob/v8.4.1/packages/cli/src/commands/setup/ui/libraries/chakra-ui.js#L10)
  3. Ensure all references to the old storybook config file directory (web/config) are migrated to the new web/.storybook directory (i.e. https://github.com/redwoodjs/redwood/blob/v8.4.1/packages/project-config/src/paths.ts#L126-L128) – may be wise to do a fulltext search to ensure nothing is left out here

At least no. 3 may be considered for a patch release for the current v8 release as it may fix things (although no issues have been reported so far that are rooted in this).

@arimendelow
Copy link
Contributor

arimendelow commented Dec 8, 2024

Looks great!! A couple notes:

paths.ts uses a different path for the new location, the old location can be removed. This was because there was a period where we had both, and they work fundamentally differently. If we think it'll be valuable, we can add paths to the various Storybook config files, but they should follow the newer naming convention as the current/old ones imply that they're in the config folder.

Anything relying on that configureStorybook script needs to be updated - I'm positive that anything those UI library scripts were doing for Storybook no longer work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants