AssetResolver
import type { AssetResolver } from "@pitlane/assets";Resolves portable source keys, such as app/entry.browser.ts or
file:app/counter.tsx#Counter, to the URLs a build or development server
produced for them.
Structurally compatible with the resolution methods of a remix/assets
asset server, so it can be passed to render({ assets }).
Methods
getHref()
getHref(path): Promise<string>;The URL of a registered browser entry, stylesheet, or other asset.
Parameters
path
string
Returns
Promise<string>
getImportMap()
getImportMap(path): Promise<ImportMap>;The complete client import map, after checking the keys belong to the client graph.
Parameters
path
string | readonly string[]
Returns
Promise<ImportMap>
getPreloads()
getPreloads(path): Promise<string[]>;Scripts' chunks and static JavaScript dependencies, and explicitly requested stylesheets.
Parameters
path
string | readonly string[]
Returns
Promise<string[]>
getScriptEntry()
getScriptEntry(path): Promise<ScriptEntry>;A registered browser entry's URL, modulepreload URLs, and the client import map.
Parameters
path
string
Returns
Promise<ScriptEntry>
getStylesheets()
getStylesheets(path): Promise<string[]>;Stylesheets the modules need, from the client graph and the current server graph.
Parameters
path
string | readonly string[]
Returns
Promise<string[]>