Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishable CSS library in NX monorepo

We need to create a pure CSS library that can be used by our Angular, React, Vue and WC applications and libraries. Something that can be accessed in a way like @myorg/styles.

It seems related to this ticket #54 but it's already Closed with a promise that something will be done to address it.

However, I still can't see a proper way (via plugin?) to do this. I'm curious how others create a shareable (framework-agnostic) styles library.

like image 543
raberana Avatar asked Oct 27 '25 03:10

raberana


1 Answers

Simply generate a library via nx generate library and reference that library in your apps. docs

Generator will generate a complete library template (ts + css) but you can clean generated code with your needs.

like image 195
Claudio Avatar answered Oct 30 '25 13:10

Claudio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!