summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar KDTS <kdtsaka@gmail.com> 2023-06-21 11:40:52 +0200
committerGravatar GitHub <noreply@github.com> 2023-06-21 10:40:52 +0100
commit3943fa390a0bd41317a673d0f841e0461c7499cd (patch)
tree4638902ace2e5147258cc263a71c7a92c740dd10
parentb9b57d901d753507243a1a93ec05fd0182647434 (diff)
downloadastro-3943fa390a0bd41317a673d0f841e0461c7499cd.tar.gz
astro-3943fa390a0bd41317a673d0f841e0461c7499cd.tar.zst
astro-3943fa390a0bd41317a673d0f841e0461c7499cd.zip
Fix minior issue in the documentation related to port customization (#7436)
-rw-r--r--.changeset/five-ghosts-sit.md5
-rw-r--r--packages/astro/src/@types/astro.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/five-ghosts-sit.md b/.changeset/five-ghosts-sit.md
new file mode 100644
index 000000000..3b23736a3
--- /dev/null
+++ b/.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.
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index a3fcdcedd..fea28d092 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -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 })
* }
* ```
*/