Skip to content
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

feat: unocss module #1043

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: unocss module #1043

wants to merge 9 commits into from

Conversation

Timeraa
Copy link
Contributor

@Timeraa Timeraa commented Oct 4, 2024

This PR should make the use of unocss with WXT a fair share easier, see reference issues: #522 #1026
Makes the need for this obsolete: #596

@aklinker1 Any way we can have the vite:devServer:extendConfig have entrypoints as well because then I can get rid of the "Entry module not found." warning you will get when it runs over entrypoints you don't want to use.

Also I am a bit uncertain but I think that unocss.entrypoints should be required so that you don't run it on files where it's not used, what's your opinion?

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit f5a1cb6
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/6713ee15f367500008178f1f
😎 Deploy Preview https://deploy-preview-1043--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.13%. Comparing base (842c158) to head (f5a1cb6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1043      +/-   ##
==========================================
+ Coverage   82.07%   82.13%   +0.06%     
==========================================
  Files         127      127              
  Lines        6661     6661              
  Branches     1112     1112              
==========================================
+ Hits         5467     5471       +4     
+ Misses       1180     1176       -4     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1
Copy link
Collaborator

aklinker1 commented Oct 19, 2024

@Timeraa I made some changes to simplify things:

  1. Convert entrypoints to excludeEntrypoints and use entrypoint names instead of paths
  2. Add configOrPath option to customize the vite plugin
  3. Added plugin to demo extension for testing.

Any way we can have the vite:devServer:extendConfig have entrypoints as well because then I can get rid of the "Entry module not found." warning you will get when it runs over entrypoints you don't want to use.

There isn't unfortunately :/. I see the warning you're talking about, don't know how to remove it.

Also I am a bit uncertain but I think that unocss.entrypoints should be required so that you don't run it on files where it's not used, what's your opinion?

I think leaving it as optional is fine. I added a default of ["background"] for it, so at least the background will be automatically removed. The majority of the time, people will use unocss in most entrypoints. The main reason to add a CSS framework is because you've got lots of CSS, and you want to use it. So I'm not too concerned about that. Someone will create an issue, we'll point them to the line in the docs about it, and everyone else will see that as well.

I have plans to clean up Vite's logs in general, after that it should be possible to improve the warning message and tell them to add the entrypoint to excludedEntrypoints.

@aklinker1
Copy link
Collaborator

Ignore the failing Continuous Publish / build check, that happens for new packages.

@aklinker1 aklinker1 linked an issue Oct 19, 2024 that may be closed by this pull request
@Timeraa
Copy link
Contributor Author

Timeraa commented Oct 22, 2024

Everything looks fine to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using @wxt-dev/module-vue together with UnoCSS
2 participants