Skip to content

ComponentLoader

type ComponentLoader<T> = () => T | Promise<T>;

Provides a component when invoked. Return import("./X").then(m => m.X) to split it into its own chunk, or the eagerly-imported component (sync) to keep it in the entry bundle — the caller decides.

T

T | Promise<T>