UNPKG

sveltekit-sprite

Version:

The plugin inline SVG into SvelteKit app template

42 lines (38 loc) 957 B
import { Plugin } from 'vite'; import { OptimizeOptions } from 'svgo'; interface Options { /** * [SVGO](https://github.com/svg/svgo) options */ svgoOptions?: OptimizeOptions & { /** * Enable default SVGO preset * Default: true */ presetDefault?: boolean; }; /** * Path folder with svg files * Subfolders are supported * ~or~ * Path to already sprite file with symbols */ svgSource?: string; /** * Prefix for symbols id * Default: svg */ symbolPrefix?: string; /** * Prefix for styles id * Default: svg-style */ stylePrefix?: string; /** * Path for generated svg sprite * Default: src/lib/sveltekit-sprite.svg */ outputFile?: string; } declare function sveltekitSprite({ svgSource, outputFile, symbolPrefix, stylePrefix, svgoOptions, }?: Options): Plugin; export { sveltekitSprite };