Currently, I am in the process of transitioning my Vue2/Webpack application to Vue3/Vite.
Here's an example of what works in Vue2/Webpack:
<div v-html="require('!!html-loader!../../assets/icons/' + this.icon + '.svg')"></div>
To include html-loader, I have added the following configuration:
"html-loader": "1.3.2",
However, when attempting the same approach in Vue3/Vite, I encounter the error:
ReferenceError: require is not defined
I've searched for a solution that allows dynamic file loading without knowing the filename during compilation. Is there a way to achieve this?