import { BlockOnMode, SafeEnvOptions } from "./types.js"; import { Plugin } from "vite"; //#region src/index.d.ts /** * A Vite plugin that prevents server-only environment variables from leaking * into client-side bundles through two coordinated detection phases. * * Phase 1 uses the `transform` hook to detect env var accesses in source modules, * then walks the module graph in `buildEnd` to identify client-reachable leaks. * * Phase 2 uses `generateBundle` to scan compiled output chunks for literal env var * values, with sourcemap resolution for precise attribution. * * @param userOptions - Optional {@link SafeEnvOptions}. All fields default to safe, non-intrusive values. * @returns A Vite plugin object ready to be added to the `plugins` array. * * @example * ```ts * import safeEnv from 'vite-plugin-safe-env' * * export default defineConfig({ * plugins: [safeEnv()], * }) * ``` */ declare function safeEnv(userOptions?: SafeEnvOptions): Plugin; //#endregion export { type BlockOnMode, type SafeEnvOptions, safeEnv as default }; //# sourceMappingURL=index.d.ts.map