-
Notifications
You must be signed in to change notification settings - Fork 616
chore: update storybook config to work with local dev #6142
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: update storybook config to work with local dev #6142
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Storybook configuration to allow host.docker.internal
when running locally.
- Adds a conditional block for
DEPLOY_ENV === 'development'
that setsconfig.server.allowedHosts
. - Introduces
host.docker.internal
alongside a misspelledlocahost
.
packages/react/.storybook/main.ts
Outdated
if (DEPLOY_ENV === 'development') { | ||
config.server = { | ||
...config.server, | ||
allowedHosts: ['locahost', 'host.docker.internal'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider merging this array with any existing config.server.allowedHosts
to avoid overwriting other allowed hosts, e.g.: allowedHosts: [...(config.server.allowedHosts ?? []), 'localhost', 'host.docker.internal']
.
allowedHosts: ['locahost', 'host.docker.internal'], | |
allowedHosts: [...(config.server.allowedHosts ?? []), 'localhost', 'host.docker.internal'], |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Add
host.docker.internal
to list of approved hosts when developing locally. This addresses an issue when usingscript/test-e2e
locally.