diff options
author | 2023-06-21 11:40:52 +0200 | |
---|---|---|
committer | 2023-06-21 10:40:52 +0100 | |
commit | 3943fa390a0bd41317a673d0f841e0461c7499cd (patch) | |
tree | 4638902ace2e5147258cc263a71c7a92c740dd10 | |
parent | b9b57d901d753507243a1a93ec05fd0182647434 (diff) | |
download | astro-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.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 }) * } * ``` */ |