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

[EXP] How to use unocss? #344

Open
2 tasks done
itmanyong opened this issue Dec 16, 2022 · 6 comments
Open
2 tasks done

[EXP] How to use unocss? #344

itmanyong opened this issue Dec 16, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@itmanyong
Copy link

What is the example you wish to see?

This one is hard to show because it is automatically generated and the code written is the same as normal. Here's an example:
The framework already supports tailwindcss. If I want to use unocss, how can I load it? I can't find the way to load other extensions

Is there any context that might help us understand?

unocss Just a plug-in, the code effect is of no reference, because just like writing a normal class name, want to know how to make it work

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@itmanyong itmanyong added the documentation Improvements or additions to documentation label Dec 16, 2022
@louisgv
Copy link
Contributor

louisgv commented Dec 19, 2022

Thanks for filing an issue - Can unocss be used as a postcss plugin?

@louisgv louisgv changed the title EXP | How do I configure the plug-in at compile time EXP | How to use unocss? Dec 19, 2022
@louisgv louisgv changed the title EXP | How to use unocss? [EXP] How to use unocss? Dec 19, 2022
@itmanyong
Copy link
Author

感谢您提交问题 - unocss 可以用作 postcss 插件吗?

According to the information I have inquired, it seems that it cannot be used directly

@shah
Copy link

shah commented May 22, 2023

I'd also like to know if UnoCSS can be used in a Plasmo extension. Thanks!

@MinakoKitani
Copy link

Thanks for filing an issue - Can unocss be used as a postcss plugin?

Unocss has @unocss/postcss plugins, but it use cjs. I followed the example provided by unocss to integrate with postcss, but I keep getting an error that says "Could not resolve module 'node:fs/promises'". Is this because plasmo's build and bundling tool is not compatible?

This is unocss's doc about how to use postcss plugins: https://unocss.dev/integrations/postcss#postcss-plugin

@MinakoKitani
Copy link

Thanks for filing an issue - Can unocss be used as a postcss plugin?

Unocss has @unocss/postcss plugins, but it use cjs. I followed the example provided by unocss to integrate with postcss, but I keep getting an error that says "Could not resolve module 'node:fs/promises'". Is this because plasmo's build and bundling tool is not compatible?

This is unocss's doc about how to use postcss plugins: https://unocss.dev/integrations/postcss#postcss-plugin

@louisgv Hello,I found it is parcel's version reason. parcel has fix this error in v2.10.0, and plasmo latest version (0.84.2) use parcel with v2.9.3.
When plasmo will update parcel's version?
parcel fix node:path error in this mr: parcel-bundler/parcel#9244

@jiweiyuan
Copy link

Same problem, could you please solve this problems

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

No branches or pull requests

5 participants