You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Would it be possible to load svg inside script tag in SFC (import) as vue-component and all svg inside template using the default Nuxt loader ?
I feel like it would be possible using webpack ressource query but i wasn't actually able to make it work using ressourceQuery: /blockType=script/.
We use SVG in 3 way in our projet:
Inline in template using vue-svg-inline-loader: <img inline src="@/assets/svg/pin.svg" width="14" height="14" />
We have a SVGo config to strip the fill so we can change the svg color using CSS
Import inside our JS file using @nuxtjs/svg or vue-svg-loader. This is mostly when we have dynamic data and we want to display the correct component without having multiple v-if/v-else-if/v-else in the template with <component :is="componentName" />
Simple <img src="path/to/file.svg" /> but this is were this plugin come into conflict. We now need to use ?inline/?raw to make this work.
The text was updated successfully, but these errors were encountered:
Hi,
Would it be possible to load svg inside script tag in SFC (import) as vue-component and all svg inside template using the default Nuxt loader ?
I feel like it would be possible using webpack ressource query but i wasn't actually able to make it work using
ressourceQuery: /blockType=script/
.We use SVG in 3 way in our projet:
Inline in template using
vue-svg-inline-loader
:<img inline src="@/assets/svg/pin.svg" width="14" height="14" />
We have a SVGo config to strip the fill so we can change the svg color using CSS
Import inside our JS file using
@nuxtjs/svg
orvue-svg-loader
. This is mostly when we have dynamic data and we want to display the correct component without having multiplev-if/v-else-if/v-else
in the template with<component :is="componentName" />
Simple
<img src="path/to/file.svg" />
but this is were this plugin come into conflict. We now need to use?inline/?raw
to make this work.The text was updated successfully, but these errors were encountered: