I’m trying to write a browser extension which injects some buttons and custom components into a website, therefore I wanted to use Tailwind (and DaisyUI) to style them.
I found this discussion and configured my project according to the solution and I got Tailwind and DaisyUI working for the popup of my extension. My App.css looks like
@tailwind base;
@tailwind components;
@tailwind utilities;
This gets imported in my Popup.tsx with import "../App.css";
. No problems there.
But when I try to do the same import in my content-script, I don’t get any errors, but the script somehow fails/doesn’t get executed at all anymore. If I put in a console.log
without importing App.css
, it gets printed. If I import App.css
, it’s not shown anymore.
Could this be an error with my webpack/postcss-config or is there something else preventing me from using custom CSS in the content script? I’m confused because it’s working in the popup without any problems.