Full resource-hint configuration.
boolean | "preload" | "prefetch" | "none" | HtmlResourceHintWebpackOptions[] | ((context: { compilation: Compilation; defaultHints: (HtmlResourceHintHtmlEntryDependency & { hostChunks: string[] })[]; entryName: string; entrypoint: Entrypoint; hostType: "html" | "js" }) => HtmlResourceHintHtmlEntryDependency[])Initial dependency-graph chunk hints. true auto-emits <link rel="modulepreload"> (ESM output) or <link rel="preload" as="script"> (classic) for each of the entry's initial dependency chunks; "prefetch" uses <link rel="prefetch">; "preload" is an alias of true; false disables chunk hints (URL-asset hints from magic comments / urlHints still fire); "none" is a hard off switch (no <link> anywhere, empty stats / manifest); an array of HtmlResourceHint descriptors replaces the auto set; a function receives the auto defaultHints plus context (entryName, entrypoint, hostType: "html" | "js", compilation) and returns the final list (replaces the removed resolveDependencies hook).
stringEmit a JSON manifest of the resolved resource hints for each entrypoint (the same descriptors as stats.entrypoints[].resourceHints) as an output asset at this path. Lets an SSR server inject the <link> tags itself without walking the chunk graph — webpack's analogue of Vite's build.ssrManifest. Empty when initial is "none".
booleanInject a tiny inline <script> polyfill for <link rel="modulepreload"> into extracted HTML pages. Defaults from the target's modulepreload support (output.environment.modulePreload) — true when the environment lacks native support, false when it has it. Set false to never inject (the <link> tags are still emitted but do nothing on browsers without support — useful under a strict CSP that forbids inline scripts).
booleanAuto-emit <link rel="preconnect"> for the origin of a cross-origin output.publicPath (the origin bundles and assets are served from) into extracted HTML entries and the resource-hint stats / manifest. Mirrors output.crossOriginLoading. No-op when publicPath is relative or "auto".
UrlHintRule[]Project-wide URL-referenced-asset hint rules, applied as the base urlHints of every parser (JavaScript new URL(...), CSS url(...), HTML <img src> / <link href>). Parser-scoped module.parser.<type>.urlHints rules and per-URL magic comments still override these.