diff options
-rw-r--r-- | .changeset/five-ghosts-sit.md | 5 | ||||
-rw-r--r-- | packages/astro/src/@types/astro.ts | 2 |
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 }) * } * ``` */ |