astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
23 lines (22 loc) • 966 B
TypeScript
import type { Environment, Rolldown } from 'vite';
type EmitFileOptions = Parameters<Rolldown.PluginContext['emitFile']>[0];
/**
* Gets or creates the handle set for an environment
*/
export declare function getHandles(env: Environment): Set<string>;
/**
* Resets the handle tracking for an environment.
* Called at the start of each build.
*/
export declare function resetHandles(env: Environment): void;
/**
* Emit a client asset and track it for later movement to the client directory.
* Use this instead of pluginContext.emitFile for assets that should
* be moved from the server/prerender directory to the client directory.
*
* Note: The pluginContext is typed as Rolldown.PluginContext for compatibility
* with content entry types, but in practice it will always have the `environment`
* property when running in Vite.
*/
export declare function emitClientAsset(pluginContext: Rolldown.PluginContext, options: EmitFileOptions): string;
export {};