How to load SVG in CSS
In the docs I found https://docs.plasmo.com/framework/import
So I did
but it resolves to
rather than
4 Replies
FYI, I need it in a content script
this is a bit... tricky :d (esp using inside css... since that chrome ID runtime must be fetched at runtime, the compiler doesn't really know about it)...
What if you try
url:~
instead?
Or maybe... hardcode it with a WARS :d....Eventually I gave up and just injected the SVG directly and absolute positioned it
Let's throw another wrench: right now I'm trying to port my SCSS to Tailwind and I cannot do
It seems like Tailwind's interpreter will run before Plasmo's, and as such it will try to evaluate the expression to
url('{pathSpring}')
and not to url('.../spring.svg')
In the worst case scenario, I will simply not use Tailwind for the background image stuffinteresting.....