property env | Bun module | Bun
BuildDocsReferenceGuidesBlogDiscord/
Bun/
BuildConfig/
envPenv
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
Bun/
BuildConfig/
envPenv
property
BuildConfig.envenv?: 'inline' | 'disable' | `${string}*`
Controls how environment variables are handled during bundling.
Can be one of:
"inline": Injects environment variables into the bundled output by converting process.env.FOO references to string literals containing the actual environment variable values"disable": Disables environment variable injection entirelyA string ending in *: Inlines environment variables that match the given prefix. For example, "MY_PUBLIC_*" will only include env vars starting with "MY_PUBLIC_"Bun.build({
env: "MY_PUBLIC_*",
entrypoints: ["src/index.ts"],
})
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →