I am trying to use something like this
<div :style="type ? {'background-image': `url('~assets/images/${type}.svg')`, 'background-position': '96% 50%'} : ''"></div>
But Nuxt doesn't resolve this path. GET http://localhost:3333/~assets/images/amex.svg 404 (Not Found)
Then I tried simple
<img :src="`~assets/images/amex.svg`">
But this one doesn't work too, so the issue only when using literals.
Any chance to fix this behavior?
Fix it by using require.
how to fix it ?? how to use require @iamdubx
For future googlers stranded on this issue, the following links will help you out:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
For future googlers stranded on this issue, the following links will help you out: