cpsoinos / nuxt-svgo

SVGO loader for Nuxt
MIT License
139 stars 10 forks source link

For images in the /public dir, I get warn in the console. #284

Closed leo91000 closed 2 months ago

leo91000 commented 2 months ago

Hello, When including a public image with this module in a vue component :

<img src="/img/icone-pageplateforme-approcheludique.svg" alt="Approche ludique" width="55" height="55" class="h-10 w-10">

I get warnings :

WARN
virtual:public?%2Fimg%2Ficone-pageplateforme-approcheludique.svg couldn't be loaded by vite-svg-loader, fallback to default loader
github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 4.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

jd1378 commented 2 months ago

I just want to point out Nuxt-Svgo cannot optimize SVGs this way it only can optimize when they are loaded as components

I have made a fix to ignore this type of usage to prevent it from throwing warns