title: Dynamically loading SVG in Vue3 and Vite
body: <p>I'm trying to convert my Vue2/Webpack app to Vue3/Vite.</p>
  <p>In Vue2/Webpack, this works:</p>
  <pre><code>&lt;div v-html=&quot;require('!!html-loader!../../assets/icons/' + this.icon + '.svg')&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Html-loader is added with:</p>
  <pre><code>&quot;html-loader&quot;: &quot;1.3.2&quot;,
  </code></pre>
  <p>In Vue3/Vite this throws the error: <code>ReferenceError: require is not defined</code></p>
  <p>I've looked around for an example of doing this but don't see how to do this without knowing the name of the file at compile time. Is that possible?</p>