Skip to content

fix(plugin-rsc): emit css deps in dev through onClientReference#1070

Closed
schiller-manuel wants to merge 2 commits intovitejs:mainfrom
schiller-manuel:deps-dev
Closed

fix(plugin-rsc): emit css deps in dev through onClientReference#1070
schiller-manuel wants to merge 2 commits intovitejs:mainfrom
schiller-manuel:deps-dev

Conversation

@schiller-manuel
Copy link
Copy Markdown
Contributor

No description provided.

@hi-ogawa
Copy link
Copy Markdown
Contributor

hi-ogawa commented Jan 20, 2026

I realized we can likely use the same mechanism as wrapResourceProxy for client reference notification. This is because module export (getter) access is not memoized by React (and also us) and that's the whole idea of wrapResourceProxy and preloadDeps. I'll probably create a new PR to remove onLoad mechanism in favor of that. Let me try.

// preload/preinit during getter access since `load` is cached on production
function wrapResourceProxy(mod: any, deps?: ResolvedAssetDeps) {

@hi-ogawa
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants