---
title: "@pitlane/assets"
description: "Framework-neutral asset resolution: construct a resolver from the manifest a build integration supplies, and read browser-entry URLs, preloads, stylesheets, and import maps from it."
url: "https://pitlane.tools/package/assets/"
---

# @pitlane/assets

Framework-neutral asset resolution: construct a resolver from the manifest a build integration supplies, and read browser-entry URLs, preloads, stylesheets, and import maps from it.

## See

[Asset resolution guide](https://pitlane.tools/guides/assets.md)

## Interfaces

- [AssetEnvironment](https://pitlane.tools/package/assets/interface/AssetEnvironment.md). Every source module observed in one environment's graph, keyed by portable source key.
- [AssetMetadata](https://pitlane.tools/package/assets/interface/AssetMetadata.md). The JavaScript and CSS one source module requires in one environment.
- [AssetResolver](https://pitlane.tools/package/assets/interface/AssetResolver.md). 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.
- [BuildAssetsManifest](https://pitlane.tools/package/assets/interface/BuildAssetsManifest.md). The manifest a production build produces.
- [DevAssetsManifest](https://pitlane.tools/package/assets/interface/DevAssetsManifest.md). The manifest a development server supplies, refreshed as the graph changes.
- [ImportMap](https://pitlane.tools/package/assets/interface/ImportMap.md). An import map as the HTML standard defines it: specifier mappings, optional scoped mappings, and optional integrity metadata.
- [RenderImportMapOptions](https://pitlane.tools/package/assets/interface/RenderImportMapOptions.md). Options for [renderImportMap](https://pitlane.tools/package/assets/function/renderImportMap.md).
- [ScriptEntry](https://pitlane.tools/package/assets/interface/ScriptEntry.md). What a browser needs to load one script entry: its URL, the URLs worth `modulepreload` hints, and the import map its imports resolve through.

## Type Aliases

- [AssetsManifest](https://pitlane.tools/package/assets/type/AssetsManifest.md). Everything `createAssetResolver` accepts. `{ mode: "unavailable" }` is what `@pitlane/assets/manifest` exports when no build integration replaced it.

## Functions

- [createAssetResolver](https://pitlane.tools/package/assets/function/createAssetResolver.md). Constructs the resolver for a manifest, usually the default export of `@pitlane/assets/manifest`. Construct it once, in a module of the app's own.
- [renderImportMap](https://pitlane.tools/package/assets/function/renderImportMap.md). Serializes an import map into an inline `<script type="importmap">` element for server-rendered HTML, or `""` when the map has no mappings.
