import type { Compiler } from '@rspack/core'; import type { DevOptions, PluginInterface } from '../types.js'; import { readDevBuild } from './steps/inject-bridge-producer.js'; import { SetupPageReload } from './steps/setup-page-reload.js'; export { classifyReloadFromSources, type ReloadInstruction, type ReloadType } from './classify-reload.js'; export { attachHtmlRefresh } from './html-refresh.js'; export { type ChangedSourcesTracker, createChangedSourcesTracker, dispatchReload, dispatchRestartReload, fullReloadsDeliveredTo, type ReloadBroker } from './reload-dispatch.js'; export { createReloadSession, type ReloadPlan, type ReloadSession, reloadEachBuild } from './reload-session.js'; export { readDevBuild }; export { SetupPageReload as PageReloadPlugin }; /** * ReloadPlugin owns the dev-only reload/HMR strategy end to end: * * - build-time injection of the reload runtime (SetupReloadStrategy, which * asks plugin-web-extension's chunk loading target for the message * fallback), the SW scripts-replay shim, and the control-bridge * producer/relay instrumentation * - the reload session (reload-session.ts): what the browser last read, * the classifier, the trim and merge a packaged browser needs, and the * dispatch. plugin-browsers and the dev server's `--no-browser` path only * say when a build was loaded and when it should reload * * Registration order matters: this plugin must be applied AFTER * plugin-web-extension, SetupReloadStrategy decorates the background and * content-script entries that feature-scripts' AddScripts declares. * * The whole pipeline is dev-only; `EXTENSION_NO_RELOAD=true` opts out. The * every-mode content-script wrapper (mount lifecycle) is NOT part of this * plugin. It lives in feature-scripts/steps/add-content-script-wrapper, and * this plugin adds the reinject runtime to it through its extension points. */ export declare class ReloadPlugin { static readonly name = "plugin-reload"; readonly manifestPath: string; readonly browser?: DevOptions['browser']; private readonly devSession?; private readonly session?; constructor(options: PluginInterface); apply(compiler: Compiler): void; }