getStyle API not firing?

I'm using the API in one of my content scripts: export const getStyle: PlasmoGetStyle = () => { console.log('RUNNING); const style = document.createElement("style") style.textContent = styleText return style } But it won't log anything to the conosle, and of course the styles aren't appearing. What could be wrong here? (the content script file does run for sure)
5 Replies
lab
lab•2y ago
Is this a ts file?
sirhaveri
sirhaveriOP•2y ago
No, tsx
Arcane
Arcane•2y ago
@Sir-Haveri has reached level 1. GG!
lab
lab•2y ago
GitHub
[RFC] Load stylesheets in sub-components · Issue #652 · PlasmoHQ/pl...
What happened? The CSS API does not load custom stylesheets when we have a custom one per component. It works only in content.tsx export const getStyle: PlasmoGetStyle = () => { const style = do...
sirhaveri
sirhaveriOP•2y ago
No, I have the function in my single content script content.tsx The workaround was to manually invoke the function and then it works Thanks a lot for your help anyhow
Want results from more Discord servers?
Add your server