Skip to content

Commit 0bac2f1

Browse files
committed
chore(rsc): deprecate @vitejs/plugin-rsc/extra API
1 parent fa1d260 commit 0bac2f1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

packages/plugin-rsc/src/extra/browser.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import {
1111
} from '../browser'
1212
import type { RscPayload } from './rsc'
1313

14+
/**
15+
* @deprecated Use `@vitejs/plugin-rsc/browser` API instead.
16+
*/
1417
export async function hydrate(): Promise<void> {
1518
const callServer: CallServerCallback = async (id, args) => {
1619
const url = new URL(window.location.href)
@@ -71,6 +74,9 @@ export async function hydrate(): Promise<void> {
7174
}
7275
}
7376

77+
/**
78+
* @deprecated Use `@vitejs/plugin-rsc/browser` API instead.
79+
*/
7480
export async function fetchRSC(
7581
request: string | URL | Request,
7682
): Promise<RscPayload['root']> {

packages/plugin-rsc/src/extra/rsc.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export type RscPayload = {
1414
returnValue?: unknown
1515
}
1616

17+
/**
18+
* @deprecated Use `@vitejs/plugin-rsc/rsc` API instead.
19+
*/
1720
export async function renderRequest(
1821
request: Request,
1922
root: React.ReactNode,

packages/plugin-rsc/src/extra/ssr.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import { injectRSCPayload } from 'rsc-html-stream/server'
55
import { createFromReadableStream } from '../ssr'
66
import type { RscPayload } from './rsc'
77

8+
/**
9+
* @deprecated Use `@vitejs/plugin-rsc/ssr` API instead.
10+
*/
811
export async function renderHtml(
912
rscStream: ReadableStream<Uint8Array>,
1013
options?: {

0 commit comments

Comments
 (0)