Skip to content

Commit

Permalink
Fix minior issue in the documentation related to port customization (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kossidts authored Jun 21, 2023
1 parent b9b57d9 commit 3943fa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-ghosts-sit.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit 3943fa3

Please sign in to comment.