rollup-plugin-svg-to-vue
v1.0.0
Published
Roll svg to Vue 3 component with Rollup
Downloads
440
Readme
Rollup Plugin SVG To Vue
A plugin roll svg files as a Vue 3 component.
Installation
npm install --save-dev rollup-plugin-svg-to-vue
Usage
config rollup.config.js
import svgToVue from 'rollup-plugin-svg-to-vue';
import vue from 'rollup-plugin-vue';
export default {
plugins: [svgToVue(/* options */), vue()],
};
Options
{
include: 'foo/**'; // default /\.svg$/
exclude: ['bar/**', 'foobar/**']; // default []
svgo: {
/* svgo options*/
} // default {}
sourceMap: false; // default false
target: 'browser'; // or 'node' for ssr
}