0.1.0 • Published 5 years ago
vue-svg-render v0.1.0
Vue SVG render
Instalation
yarn add vue-svg-renter
Configuration
The component expect that u pass a html as prop, so, I recommend use html-loader, but feel free to choose other one.
// webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.svg$/i,
loader: 'html-loader',
},
],
},
};
Usage
Pass svg as html to src prop.
<template>
<vue-SVG-render :src="require('path/to/my-svg.svg')" />
</template>
<script>
import { vueSVGRender } from 'vue-svg-render';
export default {
components: {
vueSVGRender
}
}
</script>
License
The MIT License (MIT). Please see (License File)https://github.com/edumudu/vue-svg-render/blob/master/LICENSE for more information.