From a892bcc38a4c875faccd1a017b0b07d91d117ba9 Mon Sep 17 00:00:00 2001 From: "Kossi D. T. Saka" Date: Tue, 20 Jun 2023 20:59:39 +0200 Subject: [PATCH 1/2] Fix port configuration based on command run. --- packages/astro/src/@types/astro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index a3fcdcedda9a..fea28d092a87 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 }) * } * ``` */ From d9bad9d02ffaf13cd5924dff0f4ac546d88ba875 Mon Sep 17 00:00:00 2001 From: "Kossi D. T. Saka" Date: Tue, 20 Jun 2023 21:40:37 +0200 Subject: [PATCH 2/2] Add changeset --- .changeset/five-ghosts-sit.md | 5 +++++ 1 file changed, 5 insertions(+) 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 000000000000..3b23736a3ac0 --- /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.