@tailwindcss/postcss seems to be scraping files/folders outside of the @source paths...mainly node_modules
#4396
Unanswered
kmccrory-grx
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
im running into an issue where
@tailwind/postcssis trying to work its magic on files it should not be. I found this out because a package that i have in node_modules has errors in one of its .css files. TW shouldnt be looking in these files at all, as i have in my css file sources to files that i want it to look at.e.g.
@import 'tailwindcss' source(none);
@import '@domain/config.tailwind'; //this will pull in our shared tw css with css variables.
@source "./../../../../packages/components//src//.{js,ts,jsx,tsx}";
@source "./../../../../packages/cms//src//.{js,ts,jsx,tsx}";
@source "./../../../../packages/pages//src//.{js,ts,jsx,tsx}";
@source "./../.{js,ts,jsx,tsx}";
some more context, this is in a monorepo with a large number of packages, and a few applications. some of the applications have their own
.gitignore. The root of the repo also has a.gitignore. the@sourcepaths are all outside of the application directory, and each of those.gitignorefiles hasnode_modulesdefined within it so i would assume tailwind would automatically ignore these files.am i missing something here? is there a better way to exclude
node_modules. I know the issue lies with@tailwindcss/postcssbecause when i remove it, there are no errors.Beta Was this translation helpful? Give feedback.
All reactions