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.
The previous version contained a custom directive
v-inline-svg
used to removev-html
wrapper and leave onlysvg
tag. Unfortunately, custom directives with DOM access are not working in SSR mode. Sonuxt generate
lacks to render icons.I had to remove
v-inline-svg
so for now thesvg
tag will be wrapped in span:To make it more useful some props were added:
class
andsize
.