-
Notifications
You must be signed in to change notification settings - Fork 86
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
Some svg files aren't render correctly #132
Comments
I have the same question. |
same problem |
The issue is caused by SVGO aggressively optimizing your files. To disable SVGO add the following option to the vue-svg-loader in your webpack config.
|
Thank you for the answer. |
disable SVGO working for me |
Don't completely disable SVGO instead just disable the module.exports = {
chainWebpack: (config) => {
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.use("babel-loader")
.loader("babel-loader")
.end()
.use("vue-svg-loader")
.loader("vue-svg-loader")
.options({
svgo: {
plugins: [
{removeViewBox: false}, // <-------- HERE
],
},
});
},
// ....
} Other plugins you can configure: https://svgo.dev/docs/preset-default/ |
Hi,
I can't understand why some icons aren't rendered correctly while using vue-svg-loader, while others work fine.
What's more, those icons badly rendered by svg-loader are correctly rendered if pasted directly in the vue.js template
e.g.
Some other icons which don't work for me are:
While e.g.
is rendered the same by vue-svg-loader and pasting it in the template
The text was updated successfully, but these errors were encountered: