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

Storybook not updating when the Theme package rebuilds #128

Closed
iandilling-adaptive opened this issue Nov 7, 2022 · 2 comments · Fixed by #144
Closed

Storybook not updating when the Theme package rebuilds #128

iandilling-adaptive opened this issue Nov 7, 2022 · 2 comments · Fixed by #144
Assignees
Labels
bug Something isn't working

Comments

@iandilling-adaptive
Copy link
Collaborator

iandilling-adaptive commented Nov 7, 2022

Despite storybook HMR appearing to be triggered when the Theme package rebuilds, those changes do not show until the window is refreshed.

Possible solution: Right now, the components package does not rebuild when changes are made to the theme package, despite the components package depending on the theme package. A change to the components package vite config may fix this: https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies

@iandilling-adaptive iandilling-adaptive changed the title Components package does not rebuild when it's dependencies rebuild Storybook not updating when the Theme package rebuilds Nov 7, 2022
@iandilling-adaptive
Copy link
Collaborator Author

The same issue as #127 is also triggered in this case.

@iandilling-adaptive
Copy link
Collaborator Author

I found a thread that seems to explain the issue: storybookjs/storybook#17767

The theme is imported in preview.tsx. Changes to this file seem to require a browser refresh, so when the theme is updated, this file isn't being automatically hot reloaded despite storybook rebuilding it. Enabling storyStoryV7 supposedly fixes this, but it is enabled already. This is maybe an issue with Storybook and Vite as another Vite user is seeing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant