ztron.conf.json is the project configuration file, validated by the CLI at
dev/build time in two layers (CLI fail-fast + core), and consumed via
AppBuilder.fromConfig. The hello example's full config:
For the full field table see Reference · Configuration.
Source: the ProjectConfigFile interface in packages/core/src/app.ts.
| Field | Description |
|---|---|
entry |
backend entry file |
frontend |
frontend directory |
identifier |
app identifier |
productName |
alias of appName (upstream naming) |
appName |
app name |
mainBinaryName |
main binary name |
version |
version number |
csp |
legacy top-level CSP; prefer app.security.csp (both work) |
capabilities |
legacy top-level capability list; prefer app.security.capabilities |
build.{devUrl,frontendDist,beforeDevCommand,beforeBuildCommand,beforeBundleCommand} |
build hooks and frontend dist directory |
app.{withGlobalTauri,macOSPrivateApi} |
global API injection switch, macOS private APIs |
app.security.csp / devCsp |
production/dev CSP (see Security Model) |
app.security.capabilities |
capability list (string[] | string) |
app.security.assetProtocol.{scope,requireLiteralLeadingDot} |
asset protocol scope |
app.security.freezePrototype |
freeze prototypes, anti-tampering |
bundle.{active,targets,icon,resources,category,publisher,homepage,shortDescription,longDescription,copyright,license} |
bundling metadata |
plugins |
plugin configuration (Record<string, unknown>) |
windows[] |
declarative window startup state (see Windows) |
validateProjectConfig (packages/core/src/app.ts): warns on unknown
top-level keys (keeps the value and prints unknown top-level key "..." (kept as-is)); throws on type/structure violations — e.g. build not an
object, build.devUrl not a string, app.withGlobalTauri not a boolean all
abort directly with a ztron.conf.json: ... error.
Windows/Linux bundling targets are not yet provided; the fields on this page all follow macOS behavior.
For the full field reference, see the Config Reference.
适用版本:ztron 0.3.1