UNPKG

fully-react

Version:
25 lines (22 loc) 1.03 kB
import { Plugin, PluginOption } from 'vite'; import { ReadableStream } from 'node:stream/web'; /** * Create a worker thread that will be used to render RSC chunks. * @param buildPath Absolute path to the the built RSC bundle. */ declare function createRSCWorker(buildPath: string, onReload: () => void): Promise<{ render(component: string, props: any): ReadableStream<any>; build: () => Promise<unknown>; close: () => void; }>; declare function react({ server, inspect: _inspect, reactRefresh: _reactRefresh, tsconfigPaths: _tsconfigPaths, serverEntry, clientEntry, rscEntry, appRoot, }?: { server?: boolean | undefined; inspect?: boolean | undefined; reactRefresh?: boolean | undefined; tsconfigPaths?: boolean | undefined; serverEntry?: string | undefined; clientEntry?: string | null | undefined; rscEntry?: string | null | undefined; appRoot?: string | undefined; }): (Plugin | PluginOption[] | PluginOption | undefined)[]; export { createRSCWorker, react as default, react };