excellentingenuity / laravel-mix-vue-svgicon

Laravel Mix extension that provides loading svgs as a vue component named icon, compatible with Adam Wathan's Blade extension.
MIT License
20 stars 3 forks source link

Object not rendered #6

Open wondergitluda opened 4 years ago

wondergitluda commented 4 years ago

Updating the code to 2.1.1 version an error occurred on frontend.

Instead of showing the correct .svg file traslating the <template> code, on frontend it's still the same of the the IconComponent.vue, like this.

<object data="require(SVGPATH/${icon}.svg)" type="${icon}.svg" class="fill-current margin-right-16 width-16"></object>

Why?

Here's the code my webpack.min.js

const mix = require('laravel-mix')
require('laravel-mix-vue-svgicon')
mix.svgicon('./node_modules/svg-repository')

and on my example.vue

import Icon from 'laravel-mix-vue-svgicon/IconComponent.vue'
<icon :icon="logo" />

Thanx