false>= 1.2.5To enable or configure persistent build cache.
When enabled, Rspack will store the build snapshots in the cache directory. In subsequent builds, if the cache is hit, Rspack can reuse the cached results instead of rebuilding from scratch, which can reduce the build time.
Rspack's persistent cache is experimental and may change in the future.
Setting performance.buildCache to true will enable the persistent build cache:
Or only enable cache in development mode:
stringnode_modules/.cacheSet the output directory of the cache files.
Array<string | undefined>undefinedAdd additional cache digests, the previous build cache will be invalidated when any value in the array changes.
cacheDigest allows you to add variables that affect the build result, for example process.env.SOME_ENV.
string[]buildDependencies is an array of additional code dependencies for the build. Rspack will use a hash of each of these items and all dependencies to invalidate the filesystem cache.
Equivalent to Rspack's cache.buildDependencies option.
Rsbuild will use the following configuration files as the default build dependencies:
package.jsontsconfig.json.env, .env.*.browserslistrctailwindcss.config.*Additionally:
rsbuild.config.*) to the build dependencies.When you add other build dependencies, Rsbuild merges these custom dependencies with the default dependencies and passes them to Rspack.