simple-svg-loader
v1.2.4
Published
## config:
Downloads
6
Readme
simple-svg-loader
config:
var webpack = require('webpack');
module.exports = {
module: {
rules: [
{
test: /\.svg$/,
loader: 'simple-svg-loader'
}
]
}
};
use:
import './icons/home.svg';
<a href="/">
<svg viewBox="0 0 32 32"><use xlink:href="#home"></use></svg>
Home
</a>
change id:
import './icons/home.svg?id=icon-home';
<svg viewBox="0 0 32 32"><use xlink:href="#icon-home"></use></svg>