mubaidr / vite-vue3-browser-extension-v3

Another vite powered web extension (chrome, firefox, etc.) starter template.
506 stars 67 forks source link

Question: image paths inside vue components #38

Closed feliperaul closed 1 year ago

feliperaul commented 1 year ago

First of all, great template!

Question: instead of relative image paths like

<img src="../../assets/vite.svg" />

Would it be possible to use the alias defined in vite.config.ts?

<img src="src/assets/vite.svg" />

It's not working with the current setup.

mubaidr commented 1 year ago

Sorry for the delayed repsonse, vite config needed update, please check latest config, specifically this: https://github.com/mubaidr/vite-vue3-chrome-extension-v3/blob/458c3ff554b01e5062d634422a000923e12ae4d3/vite.config.ts#L17