---
title: "assets"
description: "The Vite plugins that give `@pitlane/assets` its manifest: they serve browser entries during `vite dev`, emit them in a build, and replace `@pitlane/assets/manifest` with the manifest of the current dev server or build. Setting `allowFiles` also enforces the browser boundary."
url: "https://pitlane.tools/package/assets/vite-plugin/function/assets"
---

# assets

```ts
import { assets } from "@pitlane/assets/vite-plugin";
```

```ts
function assets(options?): PluginOption;
```

The Vite plugins that give `@pitlane/assets` its manifest: they serve browser entries during `vite dev`, emit them in a build, and replace `@pitlane/assets/manifest` with the manifest of the current dev server or build. Setting `allowFiles` also enforces the browser boundary.

## Parameters

### options?

[`AssetsPluginOptions`](https://pitlane.tools/package/assets/vite-plugin/interface/AssetsPluginOptions.md) = `{}`

## Returns

`PluginOption`

## Throws

When `allowPackages` or `denyFiles` is set without `allowFiles`.
