property RuntimeOptions.env
Since 0.2.0

The Cloudflare Workers env record. There is no ambient environment on the edge, so without this runtime.env is empty on Workers and ConfigPlugin reads nothing.

Pass what the platform provides — import { env } from 'cloudflare:workers' — and only its string entries populate runtime.env. Object bindings (KV, R2, D1, …) are published separately by CloudflarePlugin under CAPABILITIES.CLOUDFLARE, because IRuntimeServices.env is contracted as a string record.

Ignored on Deno, Node, and Bun.

Examples

Example 1

import { env } from 'cloudflare:workers';

const app = createApplication({ plugins: [RuntimePlugin({ env })] });

Type

Readonly<Record<string, unknown>>

Usage

import { type RuntimeOptions } from "runtime/src/index.ts";