Is anyone else experiencing issues with displaying a background image from the assets folder? I am currently using an image tag and it appears properly, but when I attempt to use the background-image
style, I receive a 404 error. I am utilizing Vue 3 with TypeScript and Vite 2. Any insight into what might be causing this?
Here is the code snippet that is not working:
<div style="background-image: url(./assets/img/header.png)"
></div>
However, this code works fine:
<img src="./assets/img/header.png" alt="Header" />