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

Vite: cleanup custom plugins #19087

Merged
merged 7 commits into from
Sep 2, 2022
Merged

Vite: cleanup custom plugins #19087

merged 7 commits into from
Sep 2, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 1, 2022

Issue: Our custom Vite plugins were a bit disorganized, and some are no longer needed.

What I did

I removed the no-fouc plugin, which was only needed in versions of Vite < 3, but we only support Vite 3+ now. I also removed the unused react-docgen plugin from the builder (it's in the react framework now instead).

This also moves all plugins in the builder to /plugins, and renames all plugins with a common naming convention of storybook:name-of-plugin, to aid in identification in error logs. And a major version release seemed like a good time to make that change.

Lastly, this incorporates the same change as storybookjs/builder-vite#490, to avoid problems when building typescript with the latest versions of Vite.

How to test

Fire up a vite sandbox, confirm it still works, and that you don't see a flash of unstyled content when the page is first loading up.

The issue was fixed in vite prior to 3.0, which is the lowest version we support now.
This will make them easier to understand in debug logs, for instance.
@IanVS IanVS added maintenance User-facing maintenance tasks builder-vite labels Sep 1, 2022
We need this to support the new object hooks
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@shilman
Copy link
Member

shilman commented Sep 2, 2022

No this looks like a regression from some recent interactions work. I believe @ghengeveld is aware.

@shilman shilman merged commit 7dadf50 into next Sep 2, 2022
@shilman shilman deleted the vite/plugin-cleanup branch September 2, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder-vite maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants