During my project, I utilized vue-cli with webpack and encountered an issue when trying to load an image in index.html. Here is how it was done initially:
<html>
...
<style>
.tag1 { background-image: url('<%= require('@/assets/icons/a123.svg') %>'); }
</style>
...
</html>
Now, I am transitioning to Vite and need to figure out how to load the icon in index.html using this new build tool. I attempted url(/assets/icons/a123.svg)
, but unfortunately, it resulted in a 404 error.