UNPKG

vite-plugin-svg-sprite

Version:
32 lines (31 loc) 967 B
import { Config as SvgoOptimizeOptions } from 'svgo'; import { Plugin } from 'vite'; declare const exportTypes: readonly ["vanilla", "react", "vue"]; export interface DefaultExportType { exportType?: (typeof exportTypes)[number]; } interface AdapterOptions { id: string; name: string; symbolXml: string; attributes: { width?: string | null; height?: string | null; viewBox?: string | null; }; } export interface CustomExportType { exportType: 'custom'; adapter: (options: AdapterOptions) => unknown; } type ExportType = DefaultExportType | CustomExportType; export type { SvgoOptimizeOptions }; export interface BaseSvgSpriteOptions { include?: string[] | string; symbolId?: string; svgo?: SvgoOptimizeOptions; moduleSideEffects?: boolean; } type SvgSpriteOptions = BaseSvgSpriteOptions & ExportType; declare const _default: (options?: SvgSpriteOptions) => Plugin<any>; export default _default;