Open frankykubo opened 3 years ago
Add the following lines:
svgRule.delete('type');
svgRule.delete('generator');
after svgRule.uses.clear();
Add the following lines:
svgRule.delete('type'); svgRule.delete('generator');
after
svgRule.uses.clear();
That fixes the issue. Thank you.
THANK YOU SIR!
Now I just need to try to work in the three hours i lost trying to fix this.
vue-svg-loader:0.17.0-beta.2
. They did not update the documentation as follows.
module.exports = {
chainWebpack: config => {
const svgRule = config.module.rule('svg');
svgRule.uses.clear();
svgRule.delete('type');
svgRule.delete('generator');
// If you're using Vue Cli V5, you don't need to use `vue-loader-v16:16.0.0-beta.5.4` as the documentation for `vue-svg-loader:0.17.0-beta.2` mentions.
svgRule
.use('vue-loader')
.loader('vue-loader')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader');
},
};
Version
5.0.0-beta.7
Environment info
Steps to reproduce
What is expected?
Load SVG as components without error.
What is actually happening?
Vue compiling without error, but when I open for example page on devServer, console throws error:
I suspect, it has something to do with this feature: https://github.com/vuejs/vue-cli/pull/6771 As I am not that experienced programmer to debug this, I ask you for help. Thank you.