//#region scripts/integrations/vite.d.ts export type PicoViteOptions = { /** * Project folder the automatic scan starts from. Default: the nearest folder with a * package.json above each stylesheet, then the Vite root. */ root?: string; /** true always purges, false never does. Default "auto": purge in `vite build` only. */ purge?: boolean | "auto"; /** Folder names or paths the scan leaves out, on top of the defaults and the build output. */ ignore?: string[]; /** Minify the stylesheet here. Default false, because Vite minifies CSS itself. */ minify?: boolean; }; /** The part of Vite's resolved config that the plugin reads. */ type ViteConfigLike = { root: string; command: "build" | "serve"; cacheDir?: string; build: { outDir: string; watch?: unknown; }; }; /** The part of Vite's transform context that the plugin uses. */ type TransformContext = { addWatchFile(id: string): void; warn(message: string): void; }; export type PicoVitePlugin = { name: string; enforce: "pre"; configResolved(config: ViteConfigLike): void; transform: { filter: { id: { include: RegExp[]; exclude: RegExp[]; }; }; handler(this: TransformContext, code: string, id: string): Promise<{ code: string; map: null; } | null>; }; }; /** * Pico Reforged for Vite, and for the tools that run on Vite (Astro, SvelteKit, Nuxt, React * Router). In `vite dev` the import becomes the full compiled stylesheet, so there is nothing to * wait for. In `vite build` the stylesheet is compiled with the purge pass over the project's * sources. */ export default function pico(options?: PicoViteOptions): PicoVitePlugin; //#endregion export {};