-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
What version of Tailwind CSS are you using?
v4.1.12
What build tool (or framework if it abstracts the build tool) are you using?
Vite (6.2.1
)
What version of Node.js are you using?
v22.19.0
What browser are you using?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:142.0) Gecko/20100101 Firefox/142.0
What operating system are you using?
macOS Sequoia 15.6.1
Reproduction URL
https://github.com/SanderFlooris/tailwind-4-gitignore-testcase
Instructions on how to configure the repository and how to trigger the bug has been provided in the README.
Note
This example repository uses Express.js as the back-end for simplicity, the actual project we are working on is based on Laravel.
Describe your issue
In a project we are working on we prerender some parts of the page as static HTML files, these HTML files will then dynamically be loaded in our templates to cache sections of the webpage, without caching everything.
However we discovered that Tailwind doesn't seem to pick up the classes properly inside of our cms_content
directory that contains the prerendered sections, even though we manually specify in our Tailwind configuration that that directory should be scanned.
After some digging around we figured out it was caused by the directory being gitignored, and we are unable to overwrite this. The compiler just skips over the directory entirely when we checked with DEBUG=* yarn dev
.