Use Tailwind in React Library then Consume in Application
Unanswered
Chien Français Tricolore posted this in #help-forum
Chien Français TricoloreOP
We are moving away from our design system. Our desire is to slowly replace components with tailwind variants. Thus we want to install tailwind in a library and then have our application consume said library.
I tried following this guide https://nx.dev/recipes/react/using-tailwind-css-in-react and converted one of our libraries to use tailwind. Then in that library I tried importing the styles sheet.
It does not seem to pickup the css styles in the library. If I add the styles to the app global.css it works, but we don't want to do that quite yet. So is this possible?
I tried following this guide https://nx.dev/recipes/react/using-tailwind-css-in-react and converted one of our libraries to use tailwind. Then in that library I tried importing the styles sheet.
@tailwind base;
@tailwind components;
@tailwind utilities;It does not seem to pickup the css styles in the library. If I add the styles to the app global.css it works, but we don't want to do that quite yet. So is this possible?