-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbunfig.toml
More file actions
18 lines (18 loc) · 1.06 KB
/
Copy pathbunfig.toml
File metadata and controls
18 lines (18 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Development server settings.
#
# `env` is what lets the protocol constants of README "The constants this app does not ship" reach the
# browser during development, so a working tree with .env.local comes up prefilled and one without comes up
# asking. `bun run build:local` arranges the same thing for a built copy, though by a different route: it
# names the three explicitly in scripts/build.ts, because this option substitutes only variables that are
# actually set and leaves the rest standing as `process.env.NAME`.
#
# Nothing here breaks without .env.local. Those leftover reads would throw in a browser, which is why
# src/settings.ts reads each one through a guard rather than directly.
#
# The prefix is the point. Only names beginning `BUN_PUBLIC_HELIOBIND_` are inlined, so nothing else in the
# environment can reach the browser by accident.
#
# Inlining matches literal `process.env.NAME` and nothing else — not `import.meta.env`, and not
# `const env = process.env; env.NAME`. src/settings.ts is written accordingly.
[serve.static]
env = "BUN_PUBLIC_HELIOBIND_*"