-
Notifications
You must be signed in to change notification settings - Fork 187
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
[email protected] will cause every single file in the project to be watched #359
Comments
I've created a minimal reproduction repo for this issue: https://github.com/AlexanderBelokon/nuxt-tailwind-watch |
This issue also causes Webpack to constantly builds/rebuilds storybook. |
@AlexanderBelokon It happened for me without Tailwind JIT active and I am overriding the purge CSS options in tailwind.config.js (but seems like the original config is applied as well) |
@foxed That's interesting, in my repro I can't trigger this behavior without JIT, and I didn't find an override for purge that would do it. The paths in the original post have variables that are not defined, so I could not get them to (not) work as expected. Could you please provide an example config that does? |
The default paths are the following:
In my project's tailwind config, I have the following:
The problem comes from the use of |
Added this to my repro: AlexanderBelokon/nuxt-tailwind-watch@2dfeb65, it does not trigger the problem on my machine without JIT, probably something else from your config is needed too. |
Up to [email protected] it was working fine though 🤔 |
any quickfix for this issue? |
@creazy231 I did this in my nuxt.config.js: |
thanks, that should do it till there is a fix for this issue 👍 |
Could you please try https://github.com/nuxt-community/tailwindcss-module/releases/tag/v4.2.1 and confirm it's good? |
@atinux seems to work for me, thank you! |
works for me 👍 |
@atinux works for me too, thanks a lot! 🎉 |
I reproduced this in 5.0.0-4 and the fix @fabis94 posted worked for me. |
The problem is not fixed for |
@93lucasp Just experienced the same issue with those versions, also with the above solutions not working. At the moment, I'm able to temporarily fix by removing |
@pachiraDIG yes removing But eslint now will continue to work? 🤔 |
This is still happening with |
yes but you can fix it as @pachiraDIG seggested. @atinux could you give a look to this problem please? :) |
Yep just wanted to add another report so the regression can get fixed. For posterity (and so it can be easily copied), this is what needs to be added to watchers: {
// Temporary fix: https://github.com/nuxt-community/tailwindcss-module/issues/359
webpack: {
ignored: [
'**/*.eslintcache',
'**/.git/**'
]
}
} |
@slavanossar yes it is working also this solution, thanks a lot for sharing :) |
Version
@nuxtjs/tailwindcss: 4.1.3
nuxt: 2.15.6
tailwind: >=2.1.3
Reproduction Link
No reproduction link but here's the tailwindcss PR that causes the problem: tailwindlabs/tailwindcss#4530
Steps to reproduce
Install a new project with @nuxtjs/tailwindcss and [email protected] or higher.
What is Expected?
Only the relevant project files are being watched and trigger a nuxt rebuild.
What is actually happening?
Any file in the project, including node modules, markdown files, github workflows, IDE specific files, anything is being watched and trigger a nuxt rebuild.
I think it comes from the new behaviour brought by this PR: tailwindlabs/tailwindcss#4530
This PR added a new "glob check" on paths provided to purge CSS. If the path is a glob, it will watch the directory instead.
Which is fine for these paths:
But this one is causing the issue:
Tailwind will now consider this a glob and thus push the entire
rootDir
to be watched.A potential quick fix for this would be to explicitly watch Javascript and Typescript config separately, to avoid tailwind thinking it must watch the whole directory:
The text was updated successfully, but these errors were encountered: