kjelsrud.dev/node_modules/astro/dist/vite-plugin-astro/hmr.d.ts
2023-07-19 21:31:30 +02:00

11 lines
550 B
TypeScript

import type { HmrContext, ModuleNode } from 'vite';
import type { AstroConfig } from '../@types/astro';
import { cachedCompilation } from '../core/compile/index.js';
import type { LogOptions } from '../core/logger/core.js';
export interface HandleHotUpdateOptions {
config: AstroConfig;
logging: LogOptions;
compile: () => ReturnType<typeof cachedCompilation>;
source: string;
}
export declare function handleHotUpdate(ctx: HmrContext, { config, logging, compile, source }: HandleHotUpdateOptions): Promise<ModuleNode[] | undefined>;