keepBrowserProfile
keepBrowserProfile controls whether Chromium-based browsers reuse a dev user data directory between addfox dev runs. It affects only dev mode and only Chromium-family browsers.
Type and default
- Type:
boolean | undefined - Default:
false - CLI precedence:
--keep-browser-profileforces profile keeping on for current run--no-keep-browser-profileforces profile keeping off for current run- If both are provided, the last flag wins
Role
- When
true(or CLI--keep-browser-profileis used):- Dev mode keeps a Chromium user data dir under
.addfox/cache/browser-profile/<name>-user-data, so:- extension install state
- extension settings
- login sessions and cookies
are kept between
addfox devruns.
- Dev mode keeps a Chromium user data dir under
- When
false:- Each
addfox devrun uses a fresh profile for Chromium-based browsers.
- Each
- Does not affect Firefox; Firefox profile handling is delegated to
web-ext.
Priority
keepBrowserProfile is resolved in this order (highest first):
- CLI
--keep-browser-profile/--no-keep-browser-profile browser.<name>.keepBrowserProfile(per-browser override)- Top-level
keepBrowserProfile - Deprecated
cache(CLI-c/--cache,--no-cacheor configcache) - Default
false
Examples
Enable via config
Per-browser override
One-off via CLI
One-off disable via CLI
CLI flags override keepBrowserProfile in config for that run.
Warning
The cache config field and the -c/--cache, --no-cache CLI flags are deprecated aliases; they still work but print a deprecation warning in the terminal. Migrate to keepBrowserProfile and --keep-browser-profile / --no-keep-browser-profile.
buildCache
buildCache controls the Rspack persistent build cache, which speeds up repeated builds.
Type and default
- Type:
boolean | { cacheDirectory?: string } - Default:
true - Cache files are stored in
<outputRoot>/cache/build/
Examples
For deeper rsbuild/rspack customization, use the existing rsbuild config field (object deep-merge or function form).
Related
- Dev plugin @addfox/rsbuild-plugin-extension-hmr which uses the cached profile.

