Skip to main content

Module head

Module head 

Source
Expand description

Typed homes for the page’s head: manifest preloads and head links. Typed homes for what applications put in body_prefix that is not their own markup: the route’s modulepreload links, read from the build’s manifest and nonced here, and the page’s head links.

The third, data, already has its home: PageConfig::config_json (window.__FORMA_CONFIG__, every < escaped), and in 3.0.0 the state block.

Each reaches the page through RenderCtx, so only PageHandle::render and render_browser_shell write them.

Structs§

HeadLink
A <link> for the page’s head that is not an asset of the build: an icon, a canonical URL, a feed. The typed home for what ksx Studio splices before </head>.
HeadLinkError
A HeadLink that could not be made: its code and why.
ModulePreloads
Each route’s static ESM dependencies, as the build’s manifest lists them in modulepreload (@getforma/build with codeSplitting).