Moved from https://github.com/hi-ogawa/vite-plugins/issues/969 --- I just saw https://github.com/redwoodjs/sdk/pull/625, which implements client reference css by switching `<link>` (prod) and `<style>` (dev). For server component css, we can probably do the same (i.e. switch to inline `<style>`) since we collect css in rsc environment module graph and manually inject `<link>` elements: https://github.com/vitejs/vite-plugin-react/blob/9b2741f3dc3da8e9e2ef486ab8d7eaa317230f7d/packages/plugin-rsc/src/plugin.ts#L1969-L1974 However as wrote in https://github.com/hi-ogawa/vite-plugins/issues/969#issue-3148167766, it might be difficult for client reference css since we currently rely on `ReactDOM.preinitStyle`, which only supports `<link>` injection. To replace this with inline `<style>`, we would either - new react API to hoist up inline `<style>` during ssr - inject `<style>` element via proxy getter (similar to Parcel's module proxy) - avoid client reference preload level injection and switch to `rscCssTransform` like injection Also we also should solve potential FOUC of lazy component css - https://github.com/vitejs/vite-plugin-react/pull/654 For this we might need to switch to `rscCssTransform` based approach for client reference css anyways. Also not sure how we can pass around nonce for inline style. We might need dedicated async local storage internally? --- Also we might not have to worry about this at all by accepting temporary duplicate css, but just remove `<link>` as early as possible when corresponding `<style>` is injected on client, namely dealing with this TODO: https://github.com/vitejs/vite-plugin-react/blob/9b2741f3dc3da8e9e2ef486ab8d7eaa317230f7d/packages/plugin-rsc/src/plugin.ts#L834-L844 Can this be achieved somehow by mutation observer? or some (new) API for `import.meta.hot` event? Oh, but one thing to worry about is that, after `<link>` is manually removed, I've always wondered why React doesn't add them back again after seeing new RSC payload including the same `<link>` tags. If they start to do at some point, then manual removal doesn't help (though maybe the same can be said for inline `<style>`).