Fix configuration reference docs (#6455)

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
This commit is contained in:
Chris Swithinbank 2023-03-08 13:04:01 +02:00 committed by GitHub
parent afaf366fb3
commit cf0198316d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Document `image.service` configuration option

View file

@ -706,6 +706,27 @@ export interface AstroUserConfig {
* @name Image options
*/
image?: {
/**
* @docs
* @name image.service (Experimental)
* @type {'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | string}
* @default `'astro/assets/services/squoosh'`
* @version 2.1.0
* @description
* Set which image service is used for Astros experimental assets support.
*
* The value should be a module specifier for the image service to use:
* either one of Astros two built-in services, or a third-party implementation.
*
* ```js
* {
* image: {
* // Example: Enable the Sharp-based image service
* service: 'astro/assets/services/sharp',
* },
* }
* ```
*/
// eslint-disable-next-line @typescript-eslint/ban-types
service: 'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | (string & {});
};
@ -926,6 +947,7 @@ export interface AstroUserConfig {
legacy?: object;
/**
* @docs
* @kind heading
* @name Experimental Flags
* @description