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

vue3 error #189

Open wwhtml opened 2 years ago

wwhtml commented 2 years ago

error in ./src/assets/svg/collapsed.svg

Syntax Error: Error:

Vue packages version mismatch:

This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/App.vue?vue&type=script&lang=js 1:0-52 5:16-26 @ ./src/App.vue?vue&type=script&lang=js @ ./src/App.vue @ ./src/main.js @ multi (webpack)-dev-server/client?http://192.168.5.32:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

mokone91 commented 2 years ago

Hi! vue-template-compiler is related to vue2, seems you need to use @vue/compiler-sfc

weijian-zhu commented 2 years ago

@vue/compiler-sfc does not work either @mokone91

linghengqian commented 2 years ago

You need to provide a reproducible example. If not, this issue should be closed and marked as invalid.

CryptozombiesCorp commented 2 years ago

Yeah this project no longer works with webpack 5. best to move to something else

seyfer commented 1 year ago

this is a good alternative https://github.com/shrpne/vue-inline-svg