Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Sep 12, 2025

Description

As we've seen in #776, Vite can actually handle css hmr by replacing <link rel="stylesheet" ... /> https://github.com/vitejs/vite/blob/84079a84ad94de4c1ef4f1bdb2ab448ff2c01196/packages/vite/src/client/client.ts#L200-L201. We've been adding separate import ".../xxx.css" via wrapper client js importer-resources?rsc-browser virtual for hmr, but that should be unnecessary.

TODO

@hi-ogawa hi-ogawa changed the base branch from main to 09-12-refactor_rsc_self-accept_rsc_css_module_on_client_environment September 12, 2025 07:27
@hi-ogawa hi-ogawa added the trigger: preview Trigger pkg.pr.new label Sep 12, 2025
Copy link

pkg-pr-new bot commented Sep 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/plugin-react@841
npm i https://pkg.pr.new/@vitejs/plugin-react-oxc@841
npm i https://pkg.pr.new/@vitejs/plugin-rsc@841
npm i https://pkg.pr.new/@vitejs/plugin-react-swc@841

commit: 559e3b2

@hi-ogawa hi-ogawa marked this pull request as ready for review September 12, 2025 08:59
Base automatically changed from 09-12-refactor_rsc_self-accept_rsc_css_module_on_client_environment to main September 12, 2025 09:48
@hi-ogawa hi-ogawa merged commit 2b7b90f into main Sep 13, 2025
21 checks passed
@hi-ogawa hi-ogawa deleted the 09-12-fix_rsc_keep_server_stylesheet_link_for_hmr branch September 13, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trigger: preview Trigger pkg.pr.new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local font double flashes during dev
1 participant