title: SVG Images not showing if Vue app is converted to Electron app
body: <p>I built an Vue 3 app (+ Vite) which I want to also convert to an Electron app. Every time I start the Electron app via <code>electron .</code> it looks like the SVG isn't getting packaged: <a href="https://i.stack.imgur.com/axlTS.png" rel="nofollow noreferrer">(Navigation Drawer with missing icons)</a></p>
  <p>Upon further investigation this is the case, but in my dist folder all images are available. <a href="https://i.stack.imgur.com/BIPsG.png" rel="nofollow noreferrer">(SVGs are in the dist folder)</a> But the Devtools show that they don't get into the Electron  app. <a href="https://i.stack.imgur.com/1RK53.png" rel="nofollow noreferrer">(Electron app asset folder)</a></p>
  <p>I also implemented the workaround for changing the base path in the Vite config like this (The Electron ENV gets set before I run <code>electron .</code> via a npm script):</p>
  <pre><code>import { fileURLToPath, URL } from &quot;url&quot;;
  
  import { defineConfig } from &quot;vite&quot;;
  import vue from &quot;@vitejs/plugin-vue&quot;;
  import path from &quot;path&quot;;
  
  // https://vitejs.dev/config/
  export default defineConfig({
    base:
      // eslint-disable-next-line no-undef
      process.env.ELECTRON == &quot;true&quot; ? path.resolve(__dirname, &quot;./dist/&quot;) : &quot;./&quot;,
    plugins: [vue()],
    resolve: {
      alias: {
        &quot;@&quot;: fileURLToPath(new URL(&quot;./src&quot;, import.meta.url)),
      },
    },
    assetsInclude: [&quot;**/*.svg&quot;],
  });
  </code></pre>
  <p>Does anyone have an idea what the problem might be? Thanks in advance!</p>
  <p><strong>UPDATE</strong>
  I got it working after all by following this example: <a href="https://github.com/pengYYYYY/vite-electron" rel="nofollow noreferrer">https://github.com/pengYYYYY/vite-electron</a>. Also a base tag was missing in my <code>index.html</code>.
  Like that: <code>&lt;base href=&quot;./&quot; /&gt;</code></p>