import { Environment, Plugin } from "vite"; //#region src/precompress.d.ts type PrecompressEncoding = "br" | "gzip"; interface PrecompressOptions { /** * Encodings to emit, in server-preference order: the first one the client accepts * wins. This order is also the order baked into srvx's `encodings` map. * * @default ["br", "gzip"] */ encodings?: PrecompressEncoding[]; /** * Minimum size, in bytes, of the original file. No upper bound — unlike srvx's on-the-fly * path, precompression has no 10 MiB ceiling. * * @default 1024 */ threshold?: number; } //#endregion //#region src/vite.d.ts /** Absolute path of the directory that will be served, or `undefined` when static * serving is off. Always the **client** environment's directory, whichever environment * is passed — `env` supplies only the shared top-level config and root. Vite leaves * `build.outDir` and a configured path relative to `config.root`, so both are anchored * to it rather than to `process.cwd()`. */ declare function resolveStaticDir(env: Environment, configured: string | boolean | undefined): string | undefined; /** Compute the value baked into `__UD_STATIC__`. Absolute paths pass through — * the user owns them. Otherwise we emit a path relative to the server entry so * the artifact is portable across filesystems. * * Derives from `resolveStaticDir` so the directory precompression walks and the * directory the server resolves at runtime cannot diverge. */ declare function resolveStaticHint(env: Environment, configured: string | boolean | undefined): string | false; declare function node(options?: { static?: string | boolean; importer?: string; /** * Emit `.br`/`.gz` variants of the served static assets at build time and serve * them instead of compressing on every request. * * @default false */ precompress?: boolean | PrecompressOptions; }): Plugin[]; /** Emits `.br`/`.gz` variants of the static assets at build time. `node()` includes it; add * it alone when something other than this adapter serves the client directory. */ declare function precompress(options?: boolean | PrecompressOptions): Plugin; /** Emits `.br`/`.gz` variants for the given files outside a Vite build, e.g. pages a framework * pre-renders after the build ran. */ declare function precompressFiles(files: string[], options?: boolean | PrecompressOptions): Promise<{ written: number; }>; //#endregion export { type PrecompressEncoding, type PrecompressOptions, node as default, node, precompress, precompressFiles, resolveStaticDir, resolveStaticHint };