new SvgStore(
path.resolve(__dirname, './../src/img/icons/*.svg'),
path.resolve(__dirname, './../dist/assets/icons/'),
{
name: 'icons',
prefix: 'icon-',
chunk: 'svg',
svgoOptions: {
plugins: [
{
removeTitle: true,
},
],
},
}
),
//SVG
let __svg__ = {
path: '../img/icons/*.svg', // entry
name: '../icons/icons.svg', // output
}
require('./vendor/svgxhr')(__svg__)
The output SVG sprite rebuild when i update my entry JS file. How can I watch for svg images and when i add/remove SVG images, my sprite rebuild ?