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
Pick up changes from files that are both context and content deps #9787
Conversation
We switched to absolute paths and it broke this revealing a lurking bug. Fun.
This change negatively affects Vite HMR performance with Vue 3 on our project. File change updates used to be almost instant and now take several seconds. We're on currently latest
Removing these helps a bit, but of course breaks our styles. Do you think there's a possible workaround for this, other than downgrading to |
Can you please open an issue with a reproduction? It seems unlikely to me that this would cause such a significant slowdown but as noted in the comment it's not really the "right' fix for the problem. |
@thecrypticace I prepared reproduction, see zigomir/vite-tailwind-regression#1 Repo has been made with Instead of reverting from -if (modified >= prevModified) {
+if (modified > prevModified) { |
Okay, yeah there is definitely a regression here. However, at least for the reproduction, there's a fairly simple workaround for the situation. Your content paths include all of content: [
"./index.html",
"./**/*.{js,ts,jsx,tsx}",
], This ends up scanning almost 1700 files totaling about 13.7MB. I would recommend scanning only the files you want. Since there's no content: [
"./index.html",
"./**/*.{js,ts,jsx,tsx}",
"!./node_modules", // This is the new line -- note the ! in front
], I'll look into implementing a more proper fix for the content + context deps change detection. Thanks! |
@zigomir This has been fixed and will be available in our insiders build (should be just a few minutes). I've tested it against your project and the project from the original issue and both are fixed! :) Thanks for the repro! It was helpful! |
We switched to absolute paths and it broke this revealing a lurking bug. Fun.
Fixes #9763