diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 013a6f366..00a268b8f 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -679,7 +679,7 @@ export interface AstroIntegration { 'astro:config:done'?: (options: { config: AstroConfig; setAdapter: (adapter: AstroAdapter) => void }) => void | Promise; 'astro:server:setup'?: (options: { config: Readonly; server: vite.ViteDevServer }) => void | Promise; 'astro:server:start'?: (options: { config: Readonly; address: AddressInfo }) => void | Promise; - 'astro:server:done'?: (options: {config: Readonly;}) => void | Promise; + 'astro:server:done'?: (options: { config: Readonly }) => void | Promise; 'astro:build:start'?: (options: { config: Readonly; buildConfig: BuildConfig }) => void | Promise; 'astro:build:setup'?: (options: { config: Readonly; vite: ViteConfigWithSSR; target: 'client' | 'server' }) => void; 'astro:build:done'?: (options: { config: Readonly; pages: { pathname: string }[]; dir: URL; routes: RouteData[] }) => void | Promise; diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index 0746b05ca..51a3e517f 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -95,7 +95,7 @@ export async function runHookBuildStart({ config, buildConfig }: { config: Astro export async function runHookBuildSetup({ config, vite, target }: { config: AstroConfig; vite: ViteConfigWithSSR; target: 'server' | 'client' }) { for (const integration of config.integrations) { if (integration.hooks['astro:build:setup']) { - await integration.hooks['astro:build:setup']({ vite, target }); + await integration.hooks['astro:build:setup']({ config, vite, target }); } } }