codex-team / icons

Dozens of cute svg icons made with love by CodeX for your projects. No dependencies required. Free to use and share.
MIT License
39 stars 15 forks source link

fix: nuxt ssr mode #33

Closed neSpecc closed 1 year ago

neSpecc commented 1 year ago

The previous version contained a custom directive v-inline-svg used to remove v-html wrapper and leave only svg tag. Unfortunately, custom directives with DOM access are not working in SSR mode. So nuxt generate lacks to render icons.

I had to remove v-inline-svg so for now the svg tag will be wrapped in span:

<span class="cdx-icon">
  <svg>...</svg>
</span>

To make it more useful some props were added: class and size.