property
BuildConfig.env
env?: 'inline' | 'disable' | `${string}*`
Controls how environment variables are handled during bundling.
Can be one of:
"inline": Injects environment variables into the bundled output by convertingprocess.env.FOOreferences to string literals containing the actual environment variable values"disable": Disables environment variable injection entirely- A string ending in
*: Inlines environment variables that match the given prefix. For example,"MY_PUBLIC_*"only includes env vars starting with "MY_PUBLIC_"
Bun.build({
env: "MY_PUBLIC_*",
entrypoints: ["src/index.ts"],
})