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

Start dev server middleware alongside Storybook #787

Merged
merged 1 commit into from
May 4, 2023

Conversation

askoufis
Copy link
Contributor

@askoufis askoufis commented May 3, 2023

Doing some QOL storybook uplift before the storybook 7 release.

Storybook will inject middleware found in .storybook/middleware.js into its own middleware stack. This is an intentionally undocumented feature, but given that it has been stable for at least 5 years, I don't think it will disappear any time soon, so I'm happy to depend on it.

Adding this feature neatly solves the issue where the new seekJobs braid theme needs a webfont. Shared web assets exposes a middleware for serving the webfont locally, and with this feature the middleware will also be available when running storybook.

This feature has also been requested by teams that would like to run other middleware alongside storybook.

I also did a small docs pass to add some subheadings to the storybook docs, as well as document this new feature. Will do another docs pass for storybook 7.

Finally, I moved the node-fetch dev dep from sku to test utils, where it belongs.

@askoufis askoufis requested a review from a team as a code owner May 3, 2023 01:52
@changeset-bot
Copy link

changeset-bot bot commented May 3, 2023

🦋 Changeset detected

Latest commit: 1af60be

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sku Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@michaeltaranto michaeltaranto left a comment

Choose a reason for hiding this comment

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

👏

@askoufis askoufis merged commit 7721454 into master May 4, 2023
2 checks passed
@askoufis askoufis deleted the storybook-dev-middleware branch May 4, 2023 04:59
@seek-oss-ci seek-oss-ci mentioned this pull request May 4, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants