Skip to content

Search the guides, deployment pages, and API reference.

AssetsPluginOptions

import type { AssetsPluginOptions } from "@pitlane/assets/vite-plugin";

Options for assets. remix() from @pitlane/vite-plugin-remix accepts them as remix({ assets }).

Properties

allowFiles?

optional allowFiles?: string[];

Files and globs, relative to the Vite root, that may reach the browser. Setting it turns on the browser boundary: a build that would publish any other file fails, and vite dev refuses to serve one. Read as remix/assets reads it; a directory path matches every file below it.


allowPackages?

optional allowPackages?: string[];

Packages that may reach the browser, with their dependencies and installed optionalDependencies. Peer dependencies are not included. Requires allowFiles.


chunkImportMap?

optional chunkImportMap?: boolean;

Override Vite's native setting. With neither setting present, maps are disabled.


denyFiles?

optional denyFiles?: string[];

Files and globs refused even when allowFiles or allowPackages allows them. Requires allowFiles.


include?

optional include?: string[];

Extra source keys to make available as client entries or assets.


serverEnvironments?

optional serverEnvironments?: string[];

Server environments whose module graphs provide metadata. Defaults to ["ssr"].