mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Fix getViteConfig()
type definition (#11046)
This commit is contained in:
parent
e90c98fea1
commit
086694ac31
2 changed files with 10 additions and 1 deletions
5
.changeset/popular-colts-happen.md
Normal file
5
.changeset/popular-colts-happen.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fixes `getViteConfig()` type definition to allow passing an inline Astro configuration as second argument
|
6
packages/astro/config.d.ts
vendored
6
packages/astro/config.d.ts
vendored
|
@ -1,6 +1,7 @@
|
|||
type ViteUserConfig = import('vite').UserConfig;
|
||||
type ViteUserConfigFn = import('vite').UserConfigFn;
|
||||
type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
|
||||
type AstroInlineConfig = import('./dist/@types/astro.js').AstroInlineConfig;
|
||||
type ImageServiceConfig = import('./dist/@types/astro.js').ImageServiceConfig;
|
||||
type SharpImageServiceConfig = import('./dist/assets/services/sharp.js').SharpImageServiceConfig;
|
||||
|
||||
|
@ -13,7 +14,10 @@ export function defineConfig(config: AstroUserConfig): AstroUserConfig;
|
|||
/**
|
||||
* Use Astro to generate a fully resolved Vite config
|
||||
*/
|
||||
export function getViteConfig(config: ViteUserConfig): ViteUserConfigFn;
|
||||
export function getViteConfig(
|
||||
config: ViteUserConfig,
|
||||
inlineAstroConfig?: AstroInlineConfig
|
||||
): ViteUserConfigFn;
|
||||
|
||||
/**
|
||||
* Return the configuration needed to use the Sharp-based image service
|
||||
|
|
Loading…
Reference in a new issue