-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] Sources are not being taken into consideration with Next.js 15 #15876
Comments
Enregistrement.d.ecran.le.2025-01-26.a.10.39.44.movHave also tried that before, unfortunately doesn't fix it |
Hello wongjn I'm in the exact same situation as AssisrMatheus. Tailwind is there in the css output but does not pick up any classes found in tsx files. What do your environment look like? Mine is the following:
PS: tried removing |
Consider checking if you have any |
Indeed it was the issue for me.
Then I have some projects inside my home directory. Is there a way to configure tailwind or postcss to limit the upper scope? I tried
with no success. I could also move my projects outside my home directory, but I think this scenario might happen to other people |
I haven't seen a way to configure tailwind or postcss to limit the upper scope unfortunately. The scanning is done in Rust, using tailwindcss/crates/oxide/src/scanner/allowed_paths.rs Lines 35 to 38 in 7e20c3b
tailwindcss/crates/oxide/src/scanner/allowed_paths.rs Lines 43 to 46 in 7e20c3b
|
Right now, when Oxide is scanning for files, it considers ignore files in the "root" directory it is scanning as well as all parent directories. We honor .gitignore files even when not in a git repo as an optimization in case a project has been created, contains a .gitignore, but no repo has actually been initialized. However, this has an unintended side effect of including ignore files _ouside of a repo_ when there is one. This means that if you have a .gitignore file in your home folder it'll get applied even when you're inside a git repo which is not what you'd expect. This PR addresses this by checking to see the folder being scanned is inside a repo and turns on a flag that ensures .gitignore files from the repo are the only ones used (global ignore files configured in git still work tho). This still needs lots of tests to make sure things work as expected. Fixes #15876 --------- Co-authored-by: Robin Malfait <[email protected]>
I have the same issue as @MathieuUrstein . Unfortunately your answer @wongjn doesn't really help at all. |
I'd hoped my response would at least give some context. I'm sorry it didn't live up to your expectations. This issue should have been fixed by #15941. Are you still experiencing explicit problems with files not being read due to a |
Tailwind:
4.0.0
Next.js:
15.1.6
MacOS:
Sequoia 15.2
Node:
v22.13.1
pnpm:
9.15.3
Arc Browser:
1.79.0
Reproduction URL
https://github.com/AssisrMatheus/tailwindv4-next15-no-output-repro
Setup process:
pnpx create-next-app@latest
pnpx @tailwindcss/upgrade@next
pnpm run dev
Describe your issue
In a brand new next.js 15 project. Tailwind v4 is only building base css and theme variables, all classes used within source files are ignored.
I have tried to turn off turbopack with no success. Rolling back node to v20 also doesn't help. Tried using
postcss.config.json
file format instead of current one also with no success.Current behaviour:
![Image](https://private-user-images.githubusercontent.com/12276174/406702051-0f2d6280-b1c8-4d47-95e8-52abd65a8e47.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTYxODEsIm5iZiI6MTczOTY5NTg4MSwicGF0aCI6Ii8xMjI3NjE3NC80MDY3MDIwNTEtMGYyZDYyODAtYjFjOC00ZDQ3LTk1ZTgtNTJhYmQ2NWE4ZTQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA4NTEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlZTE0YmQwZDYyNjIxMzI4NmIyZGY0MTM1MmVjNzAwMmM2MzgwZGU0ZTlkMTE3NTc5Zjk0ZWUwNWQzZWFiMGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a07DhOTblqNIQ_zoCSD3n_Odu94Ox5HWwL-h492Pa7Y)
Expected behaviour:
![Image](https://private-user-images.githubusercontent.com/12276174/406702057-a97380cc-f19b-4264-a01b-a138e882f171.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTYxODEsIm5iZiI6MTczOTY5NTg4MSwicGF0aCI6Ii8xMjI3NjE3NC80MDY3MDIwNTctYTk3MzgwY2MtZjE5Yi00MjY0LWEwMWItYTEzOGU4ODJmMTcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA4NTEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4YzQzNjUyOTUzODE1MWIxYWY5OWNkMjc0ZTFkYjFiYjExYmJlMmQ4NjcyN2JhMWZmY2M3YmMyYjdiNmVjZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BRsq1zKIOO55tdFxDn6w5r7w4PY7J5J-b21jGNDK47w)
The text was updated successfully, but these errors were encountered: