property ConfigPluginOptions.envFileOptional
Since 0.1.0

When true, a path in ConfigPluginOptions.envFilePath that does not exist is skipped instead of throwing. Defaults to false, which is the behaviour released in 0.1.0.

This exists for the layered-dotenv arrangement a scaffolded project uses: a gitignored .env beside a tracked .env.example. The file is present on the machine that generated it and absent on every fresh clone, in CI, and in a container built from the repository — so requiring it would make the project fail to start everywhere except its author's machine. A file that EXISTS but cannot be read still throws; only absence is tolerated.

Ignored when ConfigPluginOptions.instance is set.

Type

boolean

Usage

import { type ConfigPluginOptions } from "config-plugin/src/index.ts";