Fix configuration reference docs (#6455)
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
This commit is contained in:
parent
afaf366fb3
commit
cf0198316d
2 changed files with 27 additions and 0 deletions
5
.changeset/cyan-readers-wonder.md
Normal file
5
.changeset/cyan-readers-wonder.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Document `image.service` configuration option
|
|
@ -706,6 +706,27 @@ export interface AstroUserConfig {
|
||||||
* @name Image options
|
* @name Image options
|
||||||
*/
|
*/
|
||||||
image?: {
|
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 Astro’s experimental assets support.
|
||||||
|
*
|
||||||
|
* The value should be a module specifier for the image service to use:
|
||||||
|
* either one of Astro’s 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
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
service: 'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | (string & {});
|
service: 'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | (string & {});
|
||||||
};
|
};
|
||||||
|
@ -926,6 +947,7 @@ export interface AstroUserConfig {
|
||||||
legacy?: object;
|
legacy?: object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @docs
|
||||||
* @kind heading
|
* @kind heading
|
||||||
* @name Experimental Flags
|
* @name Experimental Flags
|
||||||
* @description
|
* @description
|
||||||
|
|
Loading…
Reference in a new issue