Repository navigation
|
I'm working in a Turborepo monorepo with a shared UI component library ( Environment
SetupStructure
|
Replies: 2 comments
|
In your /* globals.css */
-@import 'tailwindcss' prefix(ui);
+@import 'tailwindcss' prefix(ui) source("./components");
@import './variables.css';
@import 'tw-animate-css';This should configure Tailwind to scan the UI package components. However, you might still get conflicts between the two Tailwind imports since the are in the same "pipeline". You may need to separate them out like: +import "@acme/ui/src/globals.css";
import "./globals.css"; @import 'tailwindcss';
@plugin '@tailwindcss/typography';
/* Shared UI library */
-@import '@acme/ui/variables.css'; |
|
Thank you. That did the job |
In your
uipackage, you'd want to specify a different base path like:This should configure Tailwind to scan the UI package components.
However, you might still get conflicts between the two Tailwind imports since the are in the same "pipeline". You may need to separate them out like:
+import "@acme/ui/src/globals.css"; import "./globals.css";@import 'tailwindcss'; @plugin '@tailwindcss/typography'; /* Shared UI library */ -@import '@acme/ui/variables.css';