@4tw/vue-svg-icon
v1.0.2
Published
Vue component to display svg icons.
Downloads
32
Keywords
Readme
vue-svg-icon
Vue component to display svg icons.
Installation
yarn add @4tw/vue-svg-icon
yarn add --dev @4tw/vue-cli-plugin-svg-icon
Usage
Follow the usage on https://github.com/4teamwork/vue-cli-plugin-svg-icon.
Make sure you transpile the @4tw/vue-svg-icon dependency in your project. Because we use dynamic imports, it's not possible to precompile the library.
When you are using vue-cli simply add this option: https://cli.vuejs.org/config/#transpiledependencies.
// vue.config.js
module.exports = {
// ...
transpileDependencies: ['@4tw/vue-svg-icon'],
// ...
}
Otherwise include the library in your webpack config so vue-loader
and babel-loader
compile the dependency.
<svg-icon>myicon</svg-icon>