@@ -2100,13 +2100,7 @@ function vitePluginRscCss(
2100
2100
if ( this . environment . mode === 'dev' ) {
2101
2101
const result = collectCss ( server . environments . rsc ! , importer )
2102
2102
const cssHrefs = result . hrefs . map ( ( href ) => href . slice ( 1 ) )
2103
- const jsHrefs = [
2104
- `@id/__x00__${ toCssVirtual ( { id : importer , type : 'rsc-browser' } ) } ` ,
2105
- ]
2106
- const deps = assetsURLOfDeps (
2107
- { css : cssHrefs , js : jsHrefs } ,
2108
- manager ,
2109
- )
2103
+ const deps = assetsURLOfDeps ( { css : cssHrefs , js : [ ] } , manager )
2110
2104
return generateResourcesCode (
2111
2105
serializeValueWithRuntime ( deps ) ,
2112
2106
manager ,
@@ -2125,20 +2119,6 @@ function vitePluginRscCss(
2125
2119
`
2126
2120
}
2127
2121
}
2128
- if ( parsed ?. type === 'rsc-browser' ) {
2129
- assert ( this . environment . name === 'client' )
2130
- assert ( this . environment . mode === 'dev' )
2131
- const importer = parsed . id
2132
- const result = collectCss ( server . environments . rsc ! , importer )
2133
- let code = result . ids
2134
- . map ( ( id ) => id . replace ( / ^ \0 / , '' ) )
2135
- . map ( ( id ) => `import ${ JSON . stringify ( id ) } ;\n` )
2136
- . join ( '' )
2137
- // ensure hmr boundary at this virtual since otherwise non-self accepting css
2138
- // (e.g. css module) causes full reload
2139
- code += `if (import.meta.hot) { import.meta.hot.accept() }\n`
2140
- return code
2141
- }
2142
2122
} ,
2143
2123
hotUpdate ( ctx ) {
2144
2124
if ( this . environment . name === 'rsc' ) {
@@ -2150,10 +2130,6 @@ function vitePluginRscCss(
2150
2130
server . environments . rsc ! ,
2151
2131
`\0` + toCssVirtual ( { id : mod . id , type : 'rsc' } ) ,
2152
2132
)
2153
- invalidteModuleById (
2154
- server . environments . client ,
2155
- `\0` + toCssVirtual ( { id : mod . id , type : 'rsc-browser' } ) ,
2156
- )
2157
2133
}
2158
2134
}
2159
2135
}
0 commit comments