"git init" required for Tailwind v4/Vite class detection? #18405
-
I came across an odd problem while creating a new project and was curious if this is intended functionality. After following the documented installation steps for Vite and Tailwind v4, the default styling was stripped from elements like Is this a known requirement for getting Tailwind up and running? Or is there something particularly odd happening in my environment? I didn't see anything in the documentation about performing this step but I was curious if this was something others have found themselves needing to do. Obviously, best practices for a project should involve version control, but I often find myself spinning up the odd project here and there for prototyping. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You may have some |
Beta Was this translation helpful? Give feedback.
You may have some
.gitignore
(or equivalent) in the file system above the project root. Tailwind's automatic scanner uses git ignore rules to determine what files to scan. When you initialize a repo withgit init
, this creates a "boundary" to stop Tailwind's scanner from searching above the project root for git ignore rules.