rsbuild-plugin-preact-progressiveReference
rsbuild-plugin-preact-progressive | Reference

rsbuild-plugin-preact-progressive

Functions

installModuleLoader

Installs the JSONP-backed window.__pm and flushes any calls the server-inlined shim queued before the client bundle ran. Idempotent; safe to call from multiple entries.

FunctionType
installModuleLoader() => void

loadModule

LoadModule implementation for Rsbuild/Rspack JSONP chunks. Resolves the named export synchronously when the chunk has already loaded, otherwise returns the load promise.

import { prgressiveHydrate } from "preact-progressive/client";
import { loadModule } from "rsbuild-plugin-preact-progressive/client";

prgressiveHydrate(document.documentElement, { loadModule });
FunctionType
loadModule(mod: string, name: string) => unknown