UNPKG

vite-plugin-icons

Version:

Access thousands of icons as Vue components in Vite

45 lines (40 loc) 952 B
import { Plugin } from 'vite'; interface Options { /** * Scale of icons against 1em * * @default 1.2 */ scale?: number; /** * Style apply to icons by default * * @default '' */ defaultStyle?: string; /** * Class names apply to icons by default * * @default '' */ defaultClass?: string; /** * Compiler * * @default [detect automatically] */ compiler?: 'vue2' | 'vue3'; } interface ComponentResolverOption { componentPrefix: string; enabledCollections: string[]; } /** * Resolver for vite-plugin-components * * @param options */ declare function ViteIconsResolver(options?: Partial<ComponentResolverOption>): (name: string) => string | undefined; declare function VitePluginIcons(userOptions?: Options): Plugin; export default VitePluginIcons; export { ComponentResolverOption, VitePluginIcons as Plugin, ViteIconsResolver };