-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@wxt/unocss usage in content scripts #1125
Comments
@Timeraa Hi, just thought I'd ping you quickly. Have you managed to use UnoCSS with your module in the content script as well? |
Hey @mklueh, sorry for the late reply, It seems to work fine for me, see example linked below: |
@Timeraa thank you for your help. I managed to get it working after looking into your code, but I assume there is a bug. When using
There seems to also be another issue regarding hot reloading. If you change a UnoCSS class lets say from initially Not sure if this is a wxt thing or if it's just Chrome caching tho |
Hey sorry for the extremely late reply... I've been playing around with the |
@Timeraa no problem. I'm glad you could reproduce it and I'll try it, but wouldn't it be better to solve it somehow? |
Yeah it is a bit of a workaround right now, just can't really put in the effort to see if I can fix it easily- my project's been taking so much out of me haha |
@Timeraa no problem! thanks for your effort anyway :) Do you know another hackaround to make the CSS reload / re-inject once you use new unocss classes without restarting the entire server, or is this rather an issue with the wxt core and not this plugin? |
Describe the bug
Hello,
I've seen the new
@wxt/unocss
is out, thank you very much :)However, I cannot get it working with the content script either, but it works within the popup as expected.
Could you manage to get it working in the content script as well?
What is the general approach here, for example if I decide to use other frontend frameworks? Will they all break and lack CSS in the content script?
Reproduction
entrypoints/content/index.ts
modules: [
"@wxt-dev/module-vue",
"@wxt-dev/unocss"
],
unocss:{
configOrPath:"./unocss.config.ts"
},
manifest: {
host_permissions: [URL_PATTERN],
}
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: