Skip to content

How to set up Tailwind to parse library components in an Angular Monorepo? #18313

Closed Answered by wongjn
DarthRainbows asked this question in Help
Discussion options

You must be logged in to vote

Try explicitly telling Tailwind to scan your library code using the @source directive:

diff --git a/apps/app1/src/styles.css b/apps/app1/src/styles.css
index 2b9fc63..b71c993 100644
--- a/apps/app1/src/styles.css
+++ b/apps/app1/src/styles.css
@@ -1,5 +1,7 @@
 @import 'tailwindcss';
 
+@source "../../../libs";
+
 html,
 body {
   display: block;
diff --git a/apps/app2/src/styles.css b/apps/app2/src/styles.css
index bce6cf0..9290f5d 100644
--- a/apps/app2/src/styles.css
+++ b/apps/app2/src/styles.css
@@ -1,5 +1,7 @@
 @import 'tailwindcss';
 
+@source "../../../libs";
+
 html,
 body {
   display: block;

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by DarthRainbows
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants