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