From 3943fa390a0bd41317a673d0f841e0461c7499cd Mon Sep 17 00:00:00 2001 From: KDTS Date: Wed, 21 Jun 2023 11:40:52 +0200 Subject: [PATCH] Fix minior issue in the documentation related to port customization (#7436) --- .changeset/five-ghosts-sit.md | 5 +++++ packages/astro/src/@types/astro.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/five-ghosts-sit.md 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 }) * } * ``` */