Interface: BuildCache
Beta
Enable or configure persistent build cache.
Remarks
This feature is experimental and may be changed in the future.
Properties
buildDependencies?
optionalbuildDependencies?:string[]
Beta
An array of files containing build dependencies. Rspack will use the hash of each of these files to invalidate the persistent cache.
Default Value
['package.json', 'tsconfig.json' (or source.tsconfigPath), '.env', '.env.*', 'tailwindcss.config.*']; when using the Rspeedy CLI with performance.buildCache enabled, the loaded lynx.config.* file is also added.
Example
Add postcss.config.js to the build dependencies.
cacheDigest?
optionalcacheDigest?: (string|undefined)[]
Beta
Add additional cache digests, the previous build cache will be invalidated when any value in the array changes.
Default Value
Example
Add process.env.SOME_ENV to the cache digest.
cacheDirectory?
optionalcacheDirectory?:string
Beta
The output directory of the cache files.