File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
'use client'
2
2
3
- import * as React from 'react'
3
+ import React from 'react'
4
4
5
5
export function ClientCounter ( ) {
6
6
const [ count , setCount ] = React . useState ( 0 )
Original file line number Diff line number Diff line change 1
1
import * as ReactClient from '@vitejs/plugin-rsc/ssr' // RSC API
2
- import * as React from 'react'
2
+ import React from 'react'
3
3
import type { ReactFormState } from 'react-dom/client'
4
4
import * as ReactDOMServer from 'react-dom/server.edge'
5
5
import { injectRSCPayload } from 'rsc-html-stream/server'
Original file line number Diff line number Diff line change @@ -1958,7 +1958,7 @@ function generateResourcesCode(depsCode: string) {
1958
1958
}
1959
1959
1960
1960
return `
1961
- import * as __vite_rsc_react__ from "react";
1961
+ import __vite_rsc_react__ from "react";
1962
1962
export const Resources = (${ ResourcesFn . toString ( ) } )(__vite_rsc_react__, ${ depsCode } );
1963
1963
`
1964
1964
}
@@ -1983,7 +1983,7 @@ export async function transformRscCssExport(options: {
1983
1983
} )
1984
1984
if ( result . output . hasChanged ( ) ) {
1985
1985
if ( ! options . code . includes ( '__vite_rsc_react__' ) ) {
1986
- result . output . prepend ( `import * as __vite_rsc_react__ from "react";` )
1986
+ result . output . prepend ( `import __vite_rsc_react__ from "react";` )
1987
1987
}
1988
1988
result . output . append ( `
1989
1989
function __vite_rsc_wrap_css__(value, name) {
You can’t perform that action at this time.
0 commit comments