The rsx.config.json file is the single configuration file for RS-X build settings and CLI defaults in your project.
What it means
Place an rsx.config.json file in your project root to configure both the RS-X build pipeline and the interactive CLI. The file has two top-level sections: build (controls what rsx build and rsx typecheck generate) and cli (controls defaults for rsx init, rsx project, rsx add, and package manager selection).
The CLI validates the file at runtime and the VS Code extension contributes a JSON schema for it, so you get editor validation and completions while editing.
Practical value
Having one config file per project keeps build settings and interactive CLI defaults together and version-controlled. Every teammate and CI run uses the same tsconfig path, AOT output locations, package manager, and add defaults — without command-line flags.
Key points
Place rsx.config.json in the project root alongside package.json.
rsx init and rsx project generate a starter rsx.config.json automatically.
The build section mirrors rsx build/typecheck flags and sets per-project defaults.
The cli section sets defaults for package manager, install channel, init/project verification, and rsx add behavior.
The CLI validates the file on every command that reads config — bad config fails early with a clear message.
The VS Code extension contributes a JSON schema so rsx.config.json gets red squiggles, completions, and hover docs.
File location and loading
Place rsx.config.json in the project root (next to package.json). The CLI resolves it relative to the current working directory when a command runs.
If no rsx.config.json exists, all fields fall back to their built-in defaults. Most commands work without any config file at all.
The file must be valid JSON. Comments are not supported.
{"build":{"tsconfig":"tsconfig.app.json"}}
build.tsconfig
Type: string | Default: none
The default tsconfig path used by rsx build and rsx typecheck when --project is not passed on the command line.
Set this to avoid repeating --project tsconfig.app.json in every build script.
Overridden by the --project flag at runtime.
build.outDir
Type: string | Default: none
The default output directory used by rsx build when --out-dir is not passed on the command line.
Overridden by --out-dir at runtime.
build.preparse
Type: boolean | Default: false
Enables generation of the preparsed AST cache module during rsx build --prod.
When true, rsx build --prod writes a preparsed module to the path in build.preparseFile. The runtime loads that module to skip parsing statically-known expressions at startup.
Has no effect in dev builds (without --prod).
See the Compiler docs for when preparse is a good fit.
Path for the generated preparsed AST cache module.
Only used when build.preparse is true.
Use an app-specific path for Next.js projects (e.g. app/rsx-generated/...).
build.compiled
Type: boolean | Default: false
Enables generation of the compiled-expression plan cache module during rsx build --prod.
When true, rsx build --prod writes compiled plans to the path in build.compiledFile. The runtime uses compiled plans to avoid expression-tree evaluation for registered expression sites.
Per-expression behavior is still controlled by the compiled option passed directly to rsx(..., { compiled: false }) — build.compiled only gates whether production generation runs at all.
Path for the generated registration module that loads AOT outputs (preparsed and compiled) into the runtime caches at startup.
The entry point of your app should import this file when using AOT mode.
build.compiledResolvedEvaluator
Type: boolean | Default: false
Controls whether the compiled AOT output also embeds a resolved-dependency evaluator function alongside each compiled plan.
When false: runtime still uses compiled plans, but dependency resolution stays in shared runtime code. Smaller generated output, simpler artifacts.
When true: more dependency-resolution work is pushed into each generated compiled evaluator. Potentially faster compiled evaluation paths at the cost of larger generated output and a more aggressive AOT build.
Start with false and only enable if benchmarks show a meaningful gain for your specific expression set.
The RS-X VS Code extension contributes a JSON schema for rsx.config.json.
Once the extension is installed, VS Code will validate the file as you type, report unknown properties, and show completion suggestions and hover descriptions for every field.