damianstasik / vue-svg-loader

🔨 webpack loader that lets you use SVG files as Vue components
https://vue-svg-loader.js.org
MIT License
645 stars 86 forks source link

0.17.0-beta.1 in vue3 failed #138

Closed zhangtaoBqteam closed 4 years ago

zhangtaoBqteam commented 4 years ago

version: 0.17.0-beta.1 vue-version: vue 3.0 beta

I create the vue3 project through vue-cli, and follow the document to use the loader, but some errors occur when i use it

here is the configuration in vue.config.ts

module.exports = {
  chainWebpack: (config) => {
    const svgRule = config.module.rule('svg');
    svgRule.uses.clear();
    svgRule
      .use('vue-loader')
      .loader('vue-loader-v16') // or `vue-loader-v16` if you are using a preview support of Vue 3 in Vue CLI
      .end()
      .use('vue-svg-loader')
      .loader('vue-svg-loader');
  }
};

the usage in App.vue image

then the error occur in broswer image

zhangtaoBqteam commented 4 years ago

Here is the reproduction https://github.com/zhangtaoBqteam/feedback

syuilo commented 3 years ago

I have the same problem. Why was it closed?

arcs- commented 2 years ago

this is still an issue