File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,6 +196,8 @@ export type RscPluginOptions = {
196196 clientChunks ?: ( meta : {
197197 /** client reference module id */
198198 id : string
199+ /** normalized client reference module id */
200+ relativeId : string
199201 /** server chunk which includes a corresponding client reference proxy module */
200202 serverChunk : string
201203 } ) => string | undefined
@@ -1190,10 +1192,9 @@ function vitePluginUseClient(
11901192 let name =
11911193 useClientPluginOptions . clientChunks ?.( {
11921194 id : meta . importId ,
1195+ relativeId : manager . toRelativeId ( meta . importId ) ,
11931196 serverChunk : meta . serverChunk ! ,
1194- } ) ??
1195- // use original module id as name by default
1196- manager . toRelativeId ( meta . importId )
1197+ } ) ?? meta . serverChunk !
11971198 // ensure clean virtual id to avoid interfering with other plugins
11981199 name = cleanUrl ( name . replaceAll ( '..' , '__' ) )
11991200 const group = ( manager . clientReferenceGroups [ name ] ??= [ ] )
You can’t perform that action at this time.
0 commit comments