Skip to main content

Module assets

Module assets 

Source
Expand description

Serving content-hashed files out of the embedded dist directory.

Functions§

asset
Load a text asset from the embedded dist directory.
asset_bytes
Load raw bytes from the embedded dist directory. Returns None if missing.
load_manifest
Load and parse the asset manifest from embedded assets.
serve_asset
Axum handler: serve a static asset with content negotiation (brotli, gzip).
try_asset
Compatibility alias for asset, with the same fallible result.
try_load_manifest
Compatibility alias for load_manifest, with the same fallible result.
try_load_module_preloads
Each route’s modulepreload list from the embedded manifest.json, for RenderCtx::with_module_preloads Call it at start, beside try_load_manifest.