Skip to main content

$env/dynamic/private

This module provides access to runtime environment variables, as defined by the platform you’re running on. For example if you’re using adapter-node (or running vite preview), this is equivalent to process.env. This module only includes variables that do not begin with config.kit.env.publicPrefix and do start with config.kit.env.privatePrefix (if configured).

This module cannot be imported into client-side code.

import { import envenv } from '$env/dynamic/private';
var console: Consoleconsole.Console.log(...data: any[]): voidlog(import envenv.DEPLOYMENT_SPECIFIC_VARIABLE);

In dev, $env/dynamic always includes environment variables from .env. In prod, this behavior will depend on your adapter.

Edit this page on GitHub llms.txt