UNPKG

rsbuild-plugin-react-router

Version:
20 lines (19 loc) 984 B
import type { RsbuildPluginAPI, Rspack } from '@rsbuild/core'; import type { ServerBuild } from 'react-router'; import { type ReactRouterDevBuildPlan, type ReactRouterDevManifestSet } from './dev-runtime-artifacts.js'; export type ReactRouterDevRuntimeController = { captureWeb: (compilation: Rspack.Compilation, manifestsByEntryName: ReactRouterDevManifestSet) => void; createBuildLoader: (entryName?: string) => () => Promise<ServerBuild>; }; type CreateControllerOptions = { api: RsbuildPluginAPI; isBuild: boolean; buildPlan: ReactRouterDevBuildPlan; /** * Invoked after a development attempt commits a re-evaluated node build for * changed server files. Used to signal hot data revalidation to the client. */ onNodeRebuildCommitted?: () => void; }; export declare const createReactRouterDevRuntimeController: ({ api, isBuild, buildPlan, onNodeRebuildCommitted, }: CreateControllerOptions) => ReactRouterDevRuntimeController; export {};