Skip to content

Commit f3dac60

Browse files
committed
Revert "wip: default import"
This reverts commit 238e832.
1 parent 7d0b79e commit f3dac60

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/plugin-rsc/examples/starter/src/client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import * as React from 'react'
3+
import React from 'react'
44

55
export function ClientCounter() {
66
const [count, setCount] = React.useState(0)

packages/plugin-rsc/examples/starter/src/framework/entry.ssr.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as ReactClient from '@vitejs/plugin-rsc/ssr' // RSC API
2-
import * as React from 'react'
2+
import React from 'react'
33
import type { ReactFormState } from 'react-dom/client'
44
import * as ReactDOMServer from 'react-dom/server.edge'
55
import { injectRSCPayload } from 'rsc-html-stream/server'

packages/plugin-rsc/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ function generateResourcesCode(depsCode: string) {
19581958
}
19591959

19601960
return `
1961-
import * as __vite_rsc_react__ from "react";
1961+
import __vite_rsc_react__ from "react";
19621962
export const Resources = (${ResourcesFn.toString()})(__vite_rsc_react__, ${depsCode});
19631963
`
19641964
}
@@ -1983,7 +1983,7 @@ export async function transformRscCssExport(options: {
19831983
})
19841984
if (result.output.hasChanged()) {
19851985
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";`)
19871987
}
19881988
result.output.append(`
19891989
function __vite_rsc_wrap_css__(value, name) {

0 commit comments

Comments
 (0)