.html relative imports

Hey I'm trying to move my project into a monorepo. I used to have:
<link rel="icon" type="image/png" href="/src/assets/images/favicon.png" />
<link rel="icon" type="image/png" href="/src/assets/images/favicon.png" />
now I have
<link rel="icon" type="image/png" href="../assets/images/favicon.png" />
<link rel="icon" type="image/png" href="../assets/images/favicon.png" />
which results in the error:
Failed to resolve '../assets/images/favicon.png' from './apps/dash/.plasmo/newtab.html'
Failed to resolve '../assets/images/favicon.png' from './apps/dash/.plasmo/newtab.html'
The index.html is in apps/dash/src/newtab/index.html, and the image is in apps/dash/src/assets/images/favicon.png
1 Reply
nahtnam
nahtnamOP•13mo ago
Seems like assets needs to be outside of the src folder according to this example. https://github.com/PlasmoHQ/examples/tree/1682da7778533fc685a3ebb0257252bc9f5f4ebe/with-src I updated to ../../, that didn't work. ~assets/ didnt work, /assets/ didnt work, and /apps/dash/assets didnt work either Got it, /apps/dash worked after moving the assets folder to the root i guess i messed up when testing it
Want results from more Discord servers?
Add your server