Docs: Add allowedHosts core config option #33987
Conversation
…n Storybook core settings
📝 WalkthroughWalkthroughAdds documentation and multiple example snippets for a new main config property Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Comment |
kylegach
left a comment
There was a problem hiding this comment.
Thanks for handling this!
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/_snippets/main-config-core-allowed-hosts.md (1)
27-53: Minor inconsistency in property ordering between React snippets.The React TypeScript CSF Next snippet (lines 31-37) has
storiesbeforeframework, while the React JavaScript CSF Next snippet (lines 46-52) hasframeworkbeforestories. For consistency with the other snippets and maintainability, consider aligning the property order.Suggested fix for property order consistency
export default defineMain({ - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], framework: '@storybook/your-framework', + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], core: { allowedHosts: ['storybook.example.local'], }, });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/_snippets/main-config-core-allowed-hosts.md` around lines 27 - 53, The two CSF Next snippets export the same defineMain configuration but have inconsistent property order: in the object passed to defineMain the TypeScript snippet lists stories before framework while the JavaScript snippet lists framework before stories; update the JavaScript snippet so the exported object uses the same ordering as the TypeScript one (put stories before framework) in the default export passed to defineMain to maintain consistency across examples.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/_snippets/main-config-core-allowed-hosts.md`:
- Around line 27-53: The two CSF Next snippets export the same defineMain
configuration but have inconsistent property order: in the object passed to
defineMain the TypeScript snippet lists stories before framework while the
JavaScript snippet lists framework before stories; update the JavaScript snippet
so the exported object uses the same ordering as the TypeScript one (put stories
before framework) in the default export passed to defineMain to maintain
consistency across examples.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/_snippets/main-config-core-allowed-hosts.mddocs/api/main-config/main-config-core.mdx
Docs: Add `allowedHosts` core config option (cherry picked from commit e81fd16)
What I did
Added configuration snippet and documentation for
allowedHostsin Storybook core settings. See #33835Summary by CodeRabbit
Documentation