@arkenv/rsbuild-plugin

Exports and transform options for the Rsbuild plugin.

Edit on GitHub

API reference for @arkenv/rsbuild-plugin. Setup recipes: TanStack Start guide.

Installation

npm install -D @arkenv/rsbuild-plugin
npm install @arkenv/core arktype
pnpm add -D @arkenv/rsbuild-plugin
pnpm add @arkenv/core arktype
yarn add --dev @arkenv/rsbuild-plugin
yarn add @arkenv/core arktype
bun install --dev @arkenv/rsbuild-plugin
bun install @arkenv/core arktype

Or if you use Zod, Valibot, or another Standard Schema validator:

npm install -D @arkenv/rsbuild-plugin
npm install @arkenv/standard
pnpm add -D @arkenv/rsbuild-plugin
pnpm add @arkenv/standard
yarn add --dev @arkenv/rsbuild-plugin
yarn add @arkenv/standard
bun install --dev @arkenv/rsbuild-plugin
bun install @arkenv/standard

Exports

ExportRole
defaultarkenvPlugin plugin factory
named arkenvPluginPlugin factory
named arkenvRsbuildPluginHost-explicit named alias
./standardStandard Schema plugin entry

Transform options

Pass transform options only. A schema argument is rejected.

OptionDefaultMeaning
schemaPathauto (env.ts)Schema module to transform
clientPrefixPUBLIC_Keys exposed to the client
Plus(none)All ArkEnvConfig fields except safe
logger / logLevel(none)Logging

Call arkenvPlugin() (or arkenvRsbuildPlugin()) with no args, or an options object that includes transform fields (schemaPath, clientPrefix, logging). Do not pass a schema map or compiled type() to the plugin.

Next steps