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

Fix minior issue in the documentation related to port customization #7436

Merged
merged 3 commits into from Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/five-ghosts-sit.md
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix an issue related to the documentation. Destructure the argument of the function to customize the Astro dev server based on the command run.
2 changes: 1 addition & 1 deletion packages/astro/src/@types/astro.ts
Expand Up @@ -859,7 +859,7 @@ export interface AstroUserConfig {
* ```js
* {
* // Example: Use the function syntax to customize based on command
* server: (command) => ({ port: command === 'dev' ? 3000 : 4000 })
* server: ({ command }) => ({ port: command === 'dev' ? 3000 : 4000 })
* }
* ```
*/
Expand Down