Replies: 1 comment 2 replies
-
|
Without knowing the specific structure, it’s not clear whether you’re using a UI package and want to integrate it into a project, or why Using A dynamic path can be assigned to Related for monorepo TailwindCSS UI package with Project: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently working on an NX monorepo on an Angular project.
Here I have a separate lib for my components, but all the CSS configs ( tailwind themes, custom utils, etc.) are in project libs. But now I want to use
@applyin my components' CSS.But I need to use
@referenceand set the path of my main CSS (where I set up all my CSS configs).But the issue is that this component is in libs. It will be used by multiple apps .
And also note that I have a different theme setup for those projects.
Now, so far other devs who worked on this project used inline classes, which works, but I wanted to clean up the template a little bit.
What I need is a way to dynamically reference my main CSS file based on which project this component is used in. ( i need my global theme variables based on different projects and apply them & also there are some custom utilities i need to access them all ).
Is there any tailwind directive or any other way to do it?
Edit: now that i think about its not just an nx specific issue (nx might have some way to fix it) but on a normal pnpm workspace setup or other monorepo setup its kinda tricky.
if anyone knows any ticks or hacks to fix this let me know
Beta Was this translation helpful? Give feedback.
All reactions