-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Improve CSS HMR in RSC Framework Mode #14219
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
Improve CSS HMR in RSC Framework Mode #14219
Conversation
|
| ? [] | ||
| : [{ file: "styles.module.css", selector: "#css-modules" }]), | ||
| // TODO: Fix HMR for `?url` CSS imports in RSC Framework mode: https://github.com/vitejs/vite-plugin-react/issues/772 | ||
| // Once fixed, check if this also fixes HMR for Vanilla Extract |
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.
For vanilla extract, we found a user land workaround https://github.com/pawelblaszczyk5/vite-rsc-experiments/blob/643649f2e6562c859d9612126bfc3a183e03c7b5/apps/vanilla-extract/vite.config.ts
I'm not sure yet whether rsc plugin should handle this in some general way or vanilla extract plugin should adjust it somehow.
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
This doesn't get us to 100% support, but this solves a number of issues and ensures the tests are passing against the fixes:
@vitejs/plugin-rscto fix an issue where it was removing link tags during HMR if they were rendered by ourLinkscomponent.serverResponseto detect redirects to fix an issue where CSS was missing on page load in dev when using floated link tags.vite-css-test.tsso that we're running all passing test cases with comments explaining what's left to fix.