serveStaticAsset
function serveStaticAsset(uiDir, path): Promise<Response | null>;Defined in: src/server/static-assets.ts:51
Try to serve path (base-path-stripped, leading /) as a static file from
uiDir. Returns a Response, or null if the file does not exist or the
path escapes uiDir. Files under assets/ (content-hashed by the bundler)
are cached for a year; everything else is no-cache.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
uiDir |
string |
path |
string |
Returns
Section titled “Returns”Promise<Response | null>