shrpne / vue-inline-svg

Dynamically loads an SVG source and inline <svg> element so you can manipulate the style of it
MIT License
177 stars 22 forks source link

vue 3.3.3 not working #58

Closed fabry24 closed 3 months ago

fabry24 commented 1 year ago

Hello, When I change version of vue to 3.3.3, vue-inline-library stop working. <InlineSvg :src="require('./assets/arrow.svg')" /> throws error like

image

I have basic vue-cli app with only one library (vue-inline-svg) and with vue version 3.3.3

Could you inspect this problem?

Thank you.

nikriaz commented 1 year ago

Problem is confirmed also in Vue 3.3.4.

UPD: Resolved by updating to version vue-inline-svg 3.1.2. Mine was limited to the major version 2 in the package.json. Version 2 uses render(createElement ) which is deprecated in Vue 3 but worked for some reason till Vue 3.2.x

shrpne commented 3 months ago

@nikriaz thank you, i agree that it is probably caused by incompatible versions, vue@2 should be used with vue-inline-svg@2 and vue@3 should be used with vue-inline-svg@3