Updated hooks
This commit is contained in:
parent
20c3969a43
commit
09e8b8e502
2 changed files with 2 additions and 2 deletions
|
@ -679,7 +679,7 @@ export interface AstroIntegration {
|
|||
'astro:config:done'?: (options: { config: AstroConfig; setAdapter: (adapter: AstroAdapter) => void }) => void | Promise<void>;
|
||||
'astro:server:setup'?: (options: { config: Readonly<AstroConfig>; server: vite.ViteDevServer }) => void | Promise<void>;
|
||||
'astro:server:start'?: (options: { config: Readonly<AstroConfig>; address: AddressInfo }) => void | Promise<void>;
|
||||
'astro:server:done'?: (options: {config: Readonly<AstroConfig>;}) => void | Promise<void>;
|
||||
'astro:server:done'?: (options: { config: Readonly<AstroConfig> }) => void | Promise<void>;
|
||||
'astro:build:start'?: (options: { config: Readonly<AstroConfig>; buildConfig: BuildConfig }) => void | Promise<void>;
|
||||
'astro:build:setup'?: (options: { config: Readonly<AstroConfig>; vite: ViteConfigWithSSR; target: 'client' | 'server' }) => void;
|
||||
'astro:build:done'?: (options: { config: Readonly<AstroConfig>; pages: { pathname: string }[]; dir: URL; routes: RouteData[] }) => void | Promise<void>;
|
||||
|
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue