-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with minifying IDs #218
Comments
svgo supports |
Hi @a-ignatov-parc 😉 I have problem with SVGO version, for adding Commit with update to [email protected] was created on 8 Feb 2018, but last realease v2.1.0 was on 13 Oct 2017. If I add How I can get latest or |
@iyakd you should add it as npm i react-svg-loader@canary |
Unfortunately, that install latest |
It's strange... |
For anyone coming here still looking for a solution, here's what worked for me using const hash = require('string-hash');
const {relative} = require('path');
// ...
{
test: /\.svg$/,
include: path.resolve(__dirname, 'src'),
use: ({resource}) => (
[
{
loader: 'babel-loader?cacheDirectory'
},
{
loader: 'react-svg-loader',
options: {
svgo: {
plugins: [
{
cleanupIDs: {
prefix: `svg${hash(relative(__dirname, resource))}`,
}
}
]
}
}
}
]
)
} |
plz fix tabs ) |
Can this be solved in |
When I have several Svgs on one page, due to ID minification, all icons looks same with first icons
I tried to disable cleanupIDs, but it doesn't work. Even removeTitle doesn't work
Here's my svg file, All
#path-1
are converted into '#a' for all svgSo, all following icons are pointing first one with
#a
and looking same.Any idea and solution?
The text was updated successfully, but these errors were encountered: