diff options
author | 2023-03-08 13:04:01 +0200 | |
---|---|---|
committer | 2023-03-08 12:04:01 +0100 | |
commit | cf0198316db91a5df6750401ea3cbd7ce5330836 (patch) | |
tree | 29b328cdcb5a46574cd57abfeb400e0f0af26e5a | |
parent | afaf366fb37bc78a845890cf012dbc7d07bfb305 (diff) | |
download | astro-cf0198316db91a5df6750401ea3cbd7ce5330836.tar.gz astro-cf0198316db91a5df6750401ea3cbd7ce5330836.tar.zst astro-cf0198316db91a5df6750401ea3cbd7ce5330836.zip |
Fix configuration reference docs (#6455)
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
-rw-r--r-- | .changeset/cyan-readers-wonder.md | 5 | ||||
-rw-r--r-- | packages/astro/src/@types/astro.ts | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.changeset/cyan-readers-wonder.md b/.changeset/cyan-readers-wonder.md new file mode 100644 index 000000000..c6aac0a6d --- /dev/null +++ b/.changeset/cyan-readers-wonder.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Document `image.service` configuration option diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index d4349cf72..1100cd5f8 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -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 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 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 |