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

This commit is contained in:
KDTS 2023-06-21 11:40:52 +02:00 committed by GitHub
parent b9b57d901d
commit 3943fa390a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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 })
* }
* ```
*/