Closed mits87 closed 3 years ago
Hi,
I'm trying to use this vue-inline-svg component with Vue 3 but I have some problems. In my packages.json I have:
"vue-inline-svg": "^3.0.0-beta.1",
in my main.js file:
import InlineSvg from 'vue-inline-svg'; const app = createApp(App); app.use(InlineSvg); app.mount('#app');
and I'm trying to dispatch like that:
<inline-svg :src="require('@/assets/images/logo.svg')" />
but unfortunately it doesn't work. Any errors and no SVG on page.
Some tips?
VueInlineSvg is distributed as component, not as plugin. So try to register it as component:
app.component('inline-svg', InlineSvg);
that work for me. Thanks
Hi,
I'm trying to use this vue-inline-svg component with Vue 3 but I have some problems. In my packages.json I have:
in my main.js file:
and I'm trying to dispatch like that:
but unfortunately it doesn't work. Any errors and no SVG on page.
Some tips?