import type binding from '@rspack/binding'; import type { Compiler } from '../../index.js'; import { RspackBuiltinPlugin } from '../base.js'; import { type Coordinator } from './Coordinator.js'; /** Manifest export entry (server/client actions, module refs). */ export interface RscManifestExport { id: string; name: string; chunks: string[]; cssFiles?: string[]; async?: boolean; } /** Map of export name to manifest export. */ export type RscManifestNode = Record; /** Module loading config (prefix, crossOrigin). */ export interface RscModuleLoading { prefix: string; crossOrigin?: 'use-credentials' | ''; } export interface RscManifestPerEntry { serverManifest: Record; clientManifest: Record; serverConsumerModuleMap: Record; moduleLoading: RscModuleLoading; entryCssFiles: Record; entryJsFiles: string[]; cssLinkProps: RscCssLinkProps; } /** Full RSC manifest (all entries) passed to onManifest. Map from entry name to per-entry manifest. */ export type RscManifest = Record; export type RscCssLinkProps = Record; export type RscCssLinkOptions = { precedence?: string | false; props?: RscCssLinkProps; }; export type RscServerPluginOptions = { coordinator: Coordinator; cssLink?: RscCssLinkOptions | null; onServerComponentChanges?: () => void | Promise; onManifest?: (manifest: RscManifest) => void | Promise; }; export declare class RscServerPlugin extends RspackBuiltinPlugin { #private; name: string; constructor(options: RscServerPluginOptions); raw(compiler: Compiler): binding.BuiltinPlugin; }