-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: missing styles with build watch (#3742) #3887
Conversation
I overlooked the PR that already existed. #3747 |
Apart from that, mine contains the I think it's this one: #3566 |
Thanks for the PR @janispritzkau, let's first merge #3747 that was already reviewed, and we can see then if something is missing. In the meantime, if you want to help test it, and maybe add a test case to your PR that is not going to pass with #3747 that would be good. |
Ok, I saw now that there were enough approvals to merge it. Could you merge main against this PR and add a failing test for the bits that are not covered there? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and confirmed the fix. Thanks!
@antfu @patak-dev I'm not getting refreshes working in lib mode... |
@j please create a new issue with a minimal reproduction. Thanks! |
Description
Fixes issue #3742 by preventing the styles cache from being reset in the
vite:css-post
plugin onbuildStart
. This is necessary because already built styles will not be included in subsequent builds, since the functiontransform
will not be called again (where the styles are cached).Additional context
Maybe there are better ways to solve this without having to cache everything forever.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).