Can't get tailwind CSS to import

I set up plasmo with the with-src flag and replaced react with vue and then added tailwind. Everything is working great until I try to import the style.css file. I am working with an index.vue file in the /src/newtab directory. I have tried adding an index.html file and load the stylesheet the traditional way with a link element, I have tried importing in both the style and script tags of the vue component and I've tried adding it with the background.ts file. Every time, no matter which method I use, I get the following error: Unexpected token Number { has\_sign: false, value: 50.0, int\_value: Some(50) } In the style tag of the vue component I used the following syntax: @import "~/style.css" In the script tag of the vue component I used the followning syntax: import "data-text:~/style.css" Iin the background.ts file I used the following syntax: import cssText from "data-text:~/style.css" and the following code:
const style = document.createElement("style")
style.textContent = cssText
document.head.appendChild(style)
const style = document.createElement("style")
style.textContent = cssText
document.head.appendChild(style)
I realize background.ts is probably not the place for this but I know the code from that file was being executed so I tried it there. Again, I'm getting the same error no matter which method I choose (Unexpected token Number { has\_sign: false, value: 50.0, int\_value: Some(50) }). There is no other context provided.
2 Replies
dino_morrison
dino_morrisonOP•17mo ago
Upon further investigation I have determined that the issue is with the daisyui tailwind plugin. When I disable that plugin the error does not appear. I'll say this is solved because it's not necessarily an issue with plasmo, but my tailwind configuration was copy/pasted from my boilerplate dev site that I've used numerous times without fail. I don't know if it's worth digging into further or not.
Arcane
Arcane•17mo ago
@dino_morrison has reached level 1. GG!
Want results from more Discord servers?
Add your server