0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/astro/config.d.ts
Erika c2c71d90c2
fix: better error when Sharp can't be resolved (ex: pnpm) (#8128)
* fix: better error when Sharp can't be resolved (ex: pnpm)

* chore: changeset

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-08-18 15:02:55 +02:00

33 lines
1.2 KiB
TypeScript

type ViteUserConfig = import('vite').UserConfig;
type ViteUserConfigFn = import('vite').UserConfigFn;
type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
type ImageServiceConfig = import('./dist/@types/astro.js').ImageServiceConfig;
/**
* See the full Astro Configuration API Documentation
* https://astro.build/config
*/
export function defineConfig(config: AstroUserConfig): AstroUserConfig;
/**
* Use Astro to generate a fully resolved Vite config
*/
export function getViteConfig(config: ViteUserConfig): ViteUserConfigFn;
/**
* Return the configuration needed to use the Sharp-based image service
* See: https://docs.astro.build/en/guides/assets/#using-sharp
*/
export function sharpImageService(): ImageServiceConfig;
/**
* Return the configuration needed to use the Squoosh-based image service
*/
export function squooshImageService(): ImageServiceConfig;
/**
* Return the configuration needed to use the passthrough image service. This image services does not perform
* any image transformations, and is mainly useful when your platform does not support other image services, or you are
* not using Astro's built-in image processing.
*/
export function passthroughImageService(): ImageServiceConfig;