# Vite Plugin Reference — @rep-protocol/vite > API reference for the REP Vite plugin. repPlugin() options, dev-mode behavior, the /rep/session-key middleware, and how it differs from the production gateway. Source: https://rep-protocol.dev/reference/plugins/vite/ ```bash npm install -D @rep-protocol/vite ``` ```ts // vite.config.ts import { defineConfig } from 'vite'; import { repPlugin } from '@rep-protocol/vite'; export default defineConfig({ plugins: [repPlugin()], }); ``` ## `repPlugin(options?)` ```typescript interface RepPluginOptions { env?: string; strict?: boolean; } function repPlugin(options?: RepPluginOptions): Plugin; ``` | Option | Type | Default | Description | |---|---|---|---| | `env` | `string` | `'.env.local'` | Path to the env file, relative to the project root. Classified the same way as the gateway: `REP_PUBLIC_*`, `REP_SENSITIVE_*`, `REP_SERVER_*` prefixes. | | `strict` | `boolean` | `false` | Turn guardrail warnings into thrown errors instead of console warnings. | ```ts repPlugin({ env: '.env.development', strict: true, }) ``` ## Behavior - **Dev only.** The plugin only runs during `vite dev` (`configureServer` hook). It does nothing during `vite build` — production HTML ships with no `__rep__` script tag, and the gateway injects it at serve time instead. - **Injects `