bext.config.toml
bext.config.toml sits at the root of a PRISM app and configures the server, build, and
rendering behavior. This page documents each section. For the route tree these settings
drive, see Routing & Rendering.
Minimal example
A working minimal config — a PRISM app that watches its source for live reload and renders
with ISR on a 10-minute revalidation:
[server]
app_dir = "."
static_dir = "public"
[framework]
type = "prism"
[build]
watch_dirs = ["src/app", "src/components", "src/lib"]
live_reload = true
[rendering]
mode = "isr"
revalidate = 600
[server]
| Key |
Example |
Notes |
app_dir |
"." |
Root of the app. |
static_dir |
"public" |
Directory served as-is for static assets. |
[framework]
| Key |
Value |
Notes |
type |
"prism" |
Selects the PRISM framework. |
[build]
| Key |
Example |
Notes |
watch_dirs |
["src", ...] |
Directories the live-reload watcher observes. |
live_reload |
true |
Invalidate the route-table cache and bundles ~1-2s after a change under watch_dirs. |
Note
public/islands/* is intentionally not watched — cache-bust island scripts with a ?v=
query on the <script src>. See Deploy a PRISM Site.
[build.css]
| Key |
Value |
Notes |
route_css |
true |
JIT-compile Tailwind to /_bext/globals-compiled.css. |
[rendering]
| Key |
Example |
Notes |
mode |
"isr" or "ssr" |
Incremental static regeneration, or render on every request. |
revalidate |
600 |
ISR revalidation window, in seconds. |
Note
Routes that export a loader or action auto-skip ISR and render fresh, and a route can opt
out of caching entirely with export const dynamic = "force-dynamic". See
Routing & Rendering.
[seo]
| Key |
Value |
Notes |
sitemap |
true |
Generate a sitemap. |
robots |
true |
Generate robots.txt. |
[compile]
| Key |
Value |
Notes |
on_demand |
true |
Compile routes on demand. |
[security.csp]
Per-site Content-Security-Policy overrides.
Warning
[security.csp] is not honored for auto-vhost sites — those bound with
vhost/upsert_auto (see Deploy a PRISM Site). For those, the global policy
wins and your per-site CSP is ignored.
Related