import { Config } from "svgo"; import { Config as Config$1 } from "@svgr/core"; import { Plugin, transformWithOxc } from "vite"; //#region plugin/index.d.ts /** * Options accepted by Vite's `transformWithOxc`. Derived from the function * signature since Vite does not export this type under a stable name. */ type OxcTransformOptions = NonNullable[2]>; interface PluginOptions { /** * If "include" predicate is present, only passing paths will be processed * @param path E.g "C:/path/to/my-svg.svg" * @returns Whether given path should be processed by the plugin or not */ include?: (path: string) => boolean; /** * If "exclude" predicate is present, every path excluding passing paths will be processed * @param path E.g "C:/path/to/my-svg.svg" * @returns Whether given path should be discarded or processed by the plugin */ exclude?: (path: string) => boolean; /** * Options used while resolving as "?raw" */ rawLoaderOptions?: { /** * Enables SVGO optimizations while loading the SVG asset * @default false */ svgoEnabled?: boolean; /** * Options used while running SVGO optimizations on the original SVG asset */ svgoConfig?: Config; }; /** * Options used while resolving as "?url" */ urlLoaderOptions?: { /** * Enables SVGO optimizations while loading the SVG asset * @default false */ svgoEnabled?: boolean; /** * Options used while running SVGO optimizations on the original SVG asset */ svgoConfig?: Config; }; /** * Options used while resolving as "?base64" */ base64LoaderOptions?: { /** * Enables SVGO optimizations while loading the SVG asset * @default false */ svgoEnabled?: boolean; /** * Options used while running SVGO optimizations on the original SVG asset */ svgoConfig?: Config; }; /** * Options used while resolving as "?component" */ componentLoaderOptions?: { /** * Options used while running SVGR transform on the original svg asset */ svgrConfig?: Config$1; /** * Options used to generate JSX Component code with given SVGR output */ oxcConfig?: OxcTransformOptions; }; } declare function export_default(options?: PluginOptions): Plugin; //#endregion export { PluginOptions, export_default as default };