I’m building a simple site using parcel-bundler and vue, and at some point I bind a svg sprite value to a template literal.
<li v-for="(url, name) in social" :key="name">
<a :href="url" target="_blank">
<svg><use :xlink:href="`vectors/social.svg#${name}`" /></svg>
</a>
</li>
I know this does not work on bundled files, so I have a /static
dir where I place all files I need to access dynamicly, and use parcel-plugin-static-files-copy to copy files to /dist
on build.
Everything works fine in development, but fails after Netlify’s deployment through Github hook. Result happens to be <svg><use></use></svg>
.
My files are all lowercase, so this might not be the problem suggested in this other post.
I’ve tried to directly import svg both ways, with import
and require
. Same result: working in dev but not after deploy. I’ve also tried to disable all asset optimizations, just in case something was happening there. No success.
I’ve doublechecked deploy log and everything seems to be ok. I’m running out of ideas