Closed eloytoro closed 8 years ago
Please use svgo-loader to optimize your SVGs before they get to svg-react-loader
. You can use it as a preloader
, or add it to the loader chain for your SVGs.
ex.:
// file: webpack.config.js
module.exports = {
//...
module: {
preLoaders: [
{ test: /\.svg$/, loader: 'svgo?useConfig=svgoConfig' }
],
// or
loaders: [
{
test: /\.svg/,
loader: 'babel!svg-react!svgo',
query: {
useConfig: 'svgoConfig',
presets: ['es2015', 'react']
}
}
]
//...
}
}
Thanks,
;-j
Svgs that have comments or unknown tags, we should optimize them