Skip to content

Commit 3943fa3

Browse files
authored
Fix minior issue in the documentation related to port customization (#7436)
1 parent b9b57d9 commit 3943fa3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/five-ghosts-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fix an issue related to the documentation. Destructure the argument of the function to customize the Astro dev server based on the command run.

packages/astro/src/@types/astro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ export interface AstroUserConfig {
859859
* ```js
860860
* {
861861
* // Example: Use the function syntax to customize based on command
862-
* server: (command) => ({ port: command === 'dev' ? 3000 : 4000 })
862+
* server: ({ command }) => ({ port: command === 'dev' ? 3000 : 4000 })
863863
* }
864864
* ```
865865
*/

0 commit comments

Comments
 (0)