Final Goal : Include SVG icons from files with the possibility to use CSS on it (mainly on the fill
parameter). This seems to mean having a way to inline the SVG file in the Vue template.
I have found plenty of solutions involving webpack loaders (vue-svg-inline-loader
, vue-svg-loader
, and 2 or 3 others), but I also want to be able to choose dynamically which file I load by using a v-bind directive on the source parameter. Something like :
<img :src="`path/to/${file}.svg`" />
or
<custom-component :src="`path/to/${file}.svg`" />
And none of the webpack loaders seems to allow that. I found no vue plug-in with this feature.
My porject is a quasar-framework
project, if this can help.