@svitejs/svelte-preprocess-svg
Optimize inline svg in svelte components
Installation
npm install --save-dev @svitejs/svelte-preprocess-svg
Usage
svelte.config.js
import { sveltePreprocessSvg } from '@svitejs/svelte-preprocess-svg';
export default {
preprocess: [
sveltePreprocessSvg({
})
]
};
Documentation
options
export interface SveltePreprocessSvgOptions {
include?: (input: PreprocessorInput) => boolean;
exclude?: (input: PreprocessorInput) => boolean;
transforms?: SvgTransform[];
svgo?: boolean | object;
disableAtHtml?: boolean;
skipTransform?: (input: PreprocessorInput, transform: string, svg: string) => boolean;
useSimpleStringParser?: boolean;
}
License
MIT