cereschen / vite-plugin-svg-sprite-component

7 stars 4 forks source link

Vue-only compatible #1

Closed tanc closed 3 years ago

tanc commented 3 years ago

Hi, was trying out your plugin but it wants to import Vue which my project doesn't need. Is it possible to update the README to make this clear for the next person trying your plugin? Thanks!

cereschen commented 3 years ago

Hi, was trying out your plugin but it wants to import Vue which my project doesn't need. Is it possible to update the README to make this clear for the next person trying your plugin? Thanks!

@tanc Now, the plugin no longer just for Vue,please try 1.0.5

tanc commented 3 years ago

@cereschen thanks I can confirm it works without Vue! I did have to change the way the icon is referenced as xlink:href was not working in the browser I tested. I read that the standard is now to use href directly like so:

<svg>
  <use href="#icon-youtube" />
</svg>

Thanks again!