performance
performance.buildCache
performance.buildCache
- Type:
- Default:
false
Enables Rsbuild persistent build cache for Rstest test builds.
Tip
Rspack's persistent cache is still experimental and may change across versions, so Rstest does not enable performance.buildCache by default.
rstest.config.ts
When enabled, Rstest applies a few Rstest-specific defaults to keep the cache stable across runs:
cacheDirectorydefaults tonode_modules/.cache/rstest-<project-name>under the active project root, so projects that share the same root still get isolated caches.cacheDigestautomatically includes Rstest runtime inputs such as command, environment name, browser-vs-node mode.buildDependenciesautomatically includes the active Rstest config file, project config files, and discoveredtsconfigpaths when available.
You can customize these fields to override or extend the defaults:
cacheDirectory: override. When you provide it, Rstest uses your directory.cacheDigest: extend. Rstest keeps its own runtime digest entries and appends your custom values after them.buildDependencies: extend. Rstest keeps its own dependency files and appends your custom files after resolving relative paths from the active config file directory.
For example:
rstest.config.ts