@@ -2100,13 +2100,7 @@ function vitePluginRscCss(
21002100 if ( this . environment . mode === 'dev' ) {
21012101 const result = collectCss ( server . environments . rsc ! , importer )
21022102 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 )
21102104 return generateResourcesCode (
21112105 serializeValueWithRuntime ( deps ) ,
21122106 manager ,
@@ -2125,20 +2119,6 @@ function vitePluginRscCss(
21252119 `
21262120 }
21272121 }
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- }
21422122 } ,
21432123 hotUpdate ( ctx ) {
21442124 if ( this . environment . name === 'rsc' ) {
@@ -2150,10 +2130,6 @@ function vitePluginRscCss(
21502130 server . environments . rsc ! ,
21512131 `\0` + toCssVirtual ( { id : mod . id , type : 'rsc' } ) ,
21522132 )
2153- invalidteModuleById (
2154- server . environments . client ,
2155- `\0` + toCssVirtual ( { id : mod . id , type : 'rsc-browser' } ) ,
2156- )
21572133 }
21582134 }
21592135 }
0 commit comments