2

I'm running NX workspace with multiple apps in it as a monorepo. Recently I installed I've installed "tailwindcss": "^3.0.2". Here are my configs:

1. Package.json with dev dependencies

package.json

2. tailwind.config.js configured

tailwind.config.js

Issues facing:

  1. In SCSS file where I'm using button mixins by applying tailwind classes & re-using my own custom button classes (Works) enter image description here

  2. Tailwind lib classes applied directly in HTML file for ex: "container mx-auto", "uppercase" (Doesn't work as styles are not applied) enter image description here

Am Not sure why when tailwind lib classes when applied directly on html classes are not working where as when applied through scss files are working. Any idea?

1 Answer 1

1

The problem is with the path to the source files (content) which tailwind is unable to find. You need to modify content in your tailwind.config.js to following:

content: [
    './apps/**/src/**/*.{html,ts}', 
    './libs/**/*.html'
], 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.