-
What version of Tailwind CSS are you using? v4.1.4 What build tool (or framework if it abstracts the build tool) are you using? Vite 6.3.1 What version of Node.js are you using? v20.13.1 What browser are you using? Chrome What operating system are you using? macOS and Windows Reproduction URL https://github.com/libondev/test-tw-cli-scan-dir Describe your issue I am using cli to generate static styles for my code base, but it scans other unauthorized paths. For example: I specified my work path as The final output result should not include the class name in my Reproduction step:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
What you are experiencing is the default automatic source detection, but you can disable it, in @layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
-@import "tailwindcss/utilities.css" layer(utilities);
+@import "tailwindcss/utilities.css" layer(utilities) source(none);
@source "../src"; Also, I've just seen you could simplify your -@source "../src";
+@source "./"; |
Beta Was this translation helpful? Give feedback.
-
If anyone else sees this and encounters the problem of "files.associations": {
"*.css": "tailwindcss"
} |
Beta Was this translation helpful? Give feedback.
-
Thank you |
Beta Was this translation helpful? Give feedback.
What you are experiencing is the default automatic source detection, but you can disable it, in
src/style.css
:Also, I've just seen you could simplify your
@source
too: